https://github.com/typeonce-dev/patterns-for-state-management-with-actors-in-react-with-xstate
All the ways to implement and combine actors for state management in React using XState 🏗️
https://github.com/typeonce-dev/patterns-for-state-management-with-actors-in-react-with-xstate
actors actors-react actors-state-management state-management state-management-in-react xstate xstate-react
Last synced: 12 months ago
JSON representation
All the ways to implement and combine actors for state management in React using XState 🏗️
- Host: GitHub
- URL: https://github.com/typeonce-dev/patterns-for-state-management-with-actors-in-react-with-xstate
- Owner: typeonce-dev
- Created: 2025-05-11T04:20:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-11T04:32:00.000Z (about 1 year ago)
- Last Synced: 2025-06-05T03:20:27.621Z (about 1 year ago)
- Topics: actors, actors-react, actors-state-management, state-management, state-management-in-react, xstate, xstate-react
- Language: TypeScript
- Homepage: https://www.typeonce.dev/article/patterns-for-state-management-with-actors-in-react-with-xstate
- Size: 36.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Patterns for state management with actors in React with XState
Actors are ideal for state management, and XState has all you need to implement them in React.
This repository contains examples of how to create and combine actors with [`xstate`](https://xstate.js.org/):
- [All the logic inside a single actor](./src/routes/with-value.tsx)
- [Child sending events to parent reference](./src/routes/with-ref.tsx)
- [Parent with reference to child inside context](./src/routes/send-to.tsx)
- [Parent invokes child](./src/routes/invoke.tsx)
- [Send to parent, forward to child](./src/routes/send-parent.tsx)
> Read the full article for all the details of the implementation: [Patterns for state management with actors in React with XState](https://www.typeonce.dev/article/patterns-for-state-management-with-actors-in-react-with-xstate) 👈