yieldmachine icon indicating copy to clipboard operation
yieldmachine copied to clipboard

XState issue: managing data and context gets tricky

Open RoyalIcing opened this issue 4 years ago • 0 comments

https://twitter.com/_jonesian/status/1440101111684165632

my biggest challenge is with data dependencies inside of context. like do i assume the data is there in the initial context or do i have an idle state in each of my machines with an initialize method to report the data. it’s challenging with typescript when everything can possibly be undefined. then using those machines in react becomes challenging because you can’t pass undefined to a hook. so maybe i’m answering my question here haha

RoyalIcing avatar Sep 21 '21 00:09 RoyalIcing