You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
@Newbie012 Agree! The fact that we don't support factory machines is not exactly great, since they're a fantastic way to use XState.
@Andarist's PR will support this, though. Pretty much all the issues on the board are due to the Babel-based extraction mechanism, which #29 will replace entirely.
Following the Reddit tutorial, there's a section that demonstrates splitting machines. In that section, they create a factory that creates a machine given a subreddit name. This is my translation to typescript
As you may guess,
xstate-codegen
has an issue with it since we're not exporting the machine. The only thing that I can come up with is:createMachine
outside of the function and export it.context.subreddit
as optional.createSubredditMachine
to:The only thing that bugs me is that I had to set the
subreddit
as optional. Is there a better way of handling this?The text was updated successfully, but these errors were encountered: