Skip to content

Commit

Permalink
[v5] Alias useMachine in @xstate/react (#4240)
Browse files Browse the repository at this point in the history
* Set alias for useMachine -> useActor

* Changeset
  • Loading branch information
davidkpiano committed Sep 16, 2023
1 parent 896c605 commit 409552c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-avocados-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@xstate/react': minor
---

The `useMachine` function is aliased to `useActor` and not shown as visually deprecated.
3 changes: 1 addition & 2 deletions packages/xstate-react/src/useMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import {
import { useActor } from './useActor.ts';

/**
*
* @deprecated Use `useActor(...)` instead.
* @alias useActor
*/
export function useMachine<TMachine extends AnyStateMachine>(
machine: AreAllImplementationsAssumedToBeProvided<
Expand Down

0 comments on commit 409552c

Please sign in to comment.