Repository navigation
@xstate/svelte@6.0.0-beta.0
Pre-release
Pre-release
·
2 commits
to main
since this release
Minor Changes
-
81dd3dd:
useActorRef,useActoranduseMachineaccept an already-created actor, such as one fromrestoreActor. Thesnapshotoption is removed; restore the actor withrestoreActorfromxstate/persistand pass it to the hook. The hook starts the actor and stops it when the component is destroyed, as it does for actors it creates. Create the actor once per component instance.<script lang="ts"> import { useActor } from '@xstate/svelte'; import { restoreActor } from 'xstate/persist'; const { snapshot, send } = useActor(restoreActor(machine, persisted)); </script>
Patch Changes
- 6cf6982: XState v6 enters beta. No further breaking changes are planned for APIs tagged
@public; any that are needed will be called out with a migration path. APIs tagged@experimentalmay still change.