0.1.1 • Published 6 years ago

xstate-react v0.1.1

Weekly downloads
791
License
-
Repository
-
Last release
6 years ago

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 })
})