0.1.1 • Published 6 years ago
xstate-react v0.1.1
React XState
Package for using xState with React.
Features
A checklist of supported and planned features:
- Provider/Consumer from Context API
- onEntry, onExit
- actions
- nested state charts
- parallel state charts
- data
- activities
Setup
Install npm package
npm i xstate-react
Usage
export default reactXState({
name: "trafficLight",
machine: Machine({ ...config })
actions: ({ dispatch, transition, data }) => ({ ...actions })
})
0.1.1
6 years ago