- Notifications
You must be signed in to change notification settings - Fork47
Open
Description
The fact thatuseMachine “creates” the machine means that we can only create a machine inside an component. This problematic because...
- You can't define a mahine outside the component (eg)
- You can't get the type of the (created) machine outside the component (which is required for context,eg)
createDefinition solves 1 but doesn't solve 2 so we need something like xstate ielet m = createMachine(d); then later in componentuseMachine(m). We could add an overload to douseMachine(d) which saves users from writinguseMachine(createMachine(d))
Metadata
Metadata
Assignees
Labels
No labels