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
I often create a machine.types.tsx file that contains all of my states, events, and the type of machine. I then use these values/enums in separate machines based on platform...
Example... exampleMachine.types.tsx - exports enums for States, types for events, and the type of the machine.
exampleMachine.native.tsx - This will actually create the machine for iOS and Android (react native) that was typed in exampleMachine.types.tsx, utilizing the States enum from the same file.
exampleMachine.web.tsx - This will actually create the machine for web that was typed in exampleMachine.types.tsx, utilizing the States enum from the same file. This machine may behave a bit differently, because it is on another platform, but it still adheres to the same contract/types, so any parent machine that "uses" it has type safety.
Issue
The visualizer is not drawing the events because the parser doesn't know about them, because they live in another file.
Would it be possible to extend the functionality of the xstate-parser to search import paths for these events/states?
Thanks so much for the wonderful tool!
The text was updated successfully, but these errors were encountered:
I often create a
machine.types.tsx
file that contains all of my states, events, and the type of machine. I then use these values/enums in separate machines based on platform...Example...
exampleMachine.types.tsx
- exports enums for States, types for events, and the type of the machine.exampleMachine.native.tsx
- This will actually create the machine for iOS and Android (react native) that was typed inexampleMachine.types.tsx
, utilizing the States enum from the same file.exampleMachine.web.tsx
- This will actually create the machine for web that was typed inexampleMachine.types.tsx
, utilizing the States enum from the same file. This machine may behave a bit differently, because it is on another platform, but it still adheres to the same contract/types, so any parent machine that "uses" it has type safety.Issue
The visualizer is not drawing the events because the parser doesn't know about them, because they live in another file.
Would it be possible to extend the functionality of the
xstate-parser
to search import paths for these events/states?Thanks so much for the wonderful tool!
The text was updated successfully, but these errors were encountered: