Hacker News new | ask | show | jobs
by wilsonrocks 1856 days ago
I'm excited to try this. I've tried xstate many times and always struggled with the typescript, if this Just Works I'll be v happy
1 comments

We're constantly working on improving the TypeScript experience with XState; there are some new things like `createModel()` that might help!
Actions defined in options are the killer for me at the minute (and guards, but actions are more important generally). I've had to resort to using enums (+ type guards + coercions) for everything. Have you any idea on if/when can get these in the model API? At the minute the API is nice, but not particularly useful with only context & events. The type gen library seems to be a sticking plaster more than anything else: it's clever, but building an NPM package on the fly seems super fiddly (and flat out doesn't work with newer Yarn setups), so movement forward on inference without it would be great
Oooh createmodel is new to me - will check it out!
Oh, I need to try that too!