Skip to content

Commit d7ce39c

Browse files
authored
Merge pull request #177 from statelyai/davidkpiano/xstate-react-v5-update
Fix v5 react docs
2 parents 6674b2b + 2724250 commit d7ce39c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

versioned_docs/version-5/xstate-react.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ import { SomeMachineContext } from '../path/to/SomeMachineContext';
242242

243243
function SomeComponent() {
244244
const count = SomeMachineContext.useSelector((state) => state.context.count);
245-
const someactorRef = SomeMachineContext.useActor();
245+
const someActorRef = SomeMachineContext.useActorRef();
246246

247247
return (
248248
<div>
249249
<p>Count: {count}</p>
250-
<button onClick={() => someactorRef.send({ type: 'inc' })}>
250+
<button onClick={() => someActorRef.send({ type: 'inc' })}>
251251
Increment
252252
</button>
253253
</div>

0 commit comments

Comments
 (0)