Hacker News new | ask | show | jobs
by davidkpiano 1859 days ago
We're constantly working on improving the TypeScript experience with XState; there are some new things like `createModel()` that might help!
3 comments

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!