# xstate/release
XState @xstate/vue@6.0.0-beta.0
importance: highbreakingmigrationfeatureprerelease
The Vue hooks `useActorRef`, `useActor`, and `useMachine` can now accept an already-created actor, including one restored with `restoreActor`. The `snapshot` option is removed; XState v6 has entered beta, with no further breaking changes planned for `@public` APIs and possible changes to `@experimental` APIs.
affected
Vue users who restore or otherwise create actors before passing them to these hooks are affected; users of `@experimental` APIs should note those APIs may still change.
action
If using the removed `snapshot` option, migrate to `restoreActor` and pass the restored actor to the hook.
release_signals
-The hooks’ `snapshot` option is removed. Restore an actor with `restoreActor` from `xstate/persist` and pass the actor to a hook instead.
+`useActorRef`, `useActor`, and `useMachine` accept an existing actor; hooks start it on mount and stop it on unmount.
migration_steps1 steps
- 01Replace use of the removed `snapshot` option by restoring the actor with `restoreActor` from `xstate/persist` and passing it to the hook. Create the actor once per component instance.
code_snippet
import { useActor } from '@xstate/vue';
import { restoreActor } from 'xstate/persist';
// in setup()
const { snapshot, send } = useActor(restoreActor(machine, persisted));# community_signal
How useful is this release to your stack?
—
net score
Sign in with GitHub to cast your vote.
Sign in with GitHub to vote
You’ll return to this release, then choose your vote.