Adapted from @xstate/store, MIT License, Copyright (c) 2015 David Khourshid
- Added a second argument
event
tosubscribe
, which is the send event that triggered this state change. - Removed React-specific code (
useSelector
), XState-specific code (fromStore
) andcreateStoreWithProducer
.
Read the original docs here.