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
When a state chart includes imported values, the visualizer doesn't seem to be resolving them, which makes the visualizer fail. This makes it really hard to share code across the various parts of our system. Given that the visualizer is a huge selling point, this is probably going to make me recommend not using xstate.
I'd be happy to try helping with this, but I'm having trouble getting the repo working with VSCode. If there are directions for that somewhere, I'd appreciate it.
@davidkpiano this is actually a serious problem. I also prefer to keep my states as enums and action types outside of the state description to not bloat the state file. I guess this might be related to how the Stately.ai online editor works - it also expect all the variables defined in one file. But this limitation in VS Code makes it unusable for large projects.
I was going to adapt XState library and showcase the cool state charts to my team but now I can't do it without breaching our code organization guidelines.
I have the same issue in our project. I tried to import the states definition from an external file and it did not work. But if states are defined in the demo file inline it works great. The sample project @adrianbw has perfectly sums up the problem.
When a state chart includes imported values, the visualizer doesn't seem to be resolving them, which makes the visualizer fail. This makes it really hard to share code across the various parts of our system. Given that the visualizer is a huge selling point, this is probably going to make me recommend not using xstate.
Here's without imports:
And with:
I've created a reproduction of this issue here: https://github.com/adrianbw/xstate-vscode-import-problem.
The text was updated successfully, but these errors were encountered: