-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
The fact that useMachine “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 ie let m = createMachine(d); then later in component useMachine(m). We could add an overload to do useMachine(d) which saves users from writing useMachine(createMachine(d))
smhmd and KutnerUri
Metadata
Metadata
Assignees
Labels
No labels