I did const machine = createMachine({}) and clicked Open Visual Editor but all changes I make in visual editor are not reflected in code.
It only adds a comment /** @limpid star-layout randomnumbers */ inside the machine but nothing else I do in visual editor. What could be the issue?
I tried it on Windows and Mac and both doesnt work...
#Visual editor changes don't appear in code
1 messages · Page 1 of 1 (latest)
Sorry to hear it's causing problems. Can you try deleting what you have and create your initial machine using our provided xsm snippet? https://stately.ai/blog/2022-08-10-get-started-with-xstate-using-xsm-snippet
I used xsm , made changes in visual editor and it still won't update the code
but when I change something in code, then it updates in visual editor
What happens if you close the visual editor, delete the line with the layout comment and reopen the visual editor?
I tried to delete the comment, reopen Visual editor, reopen VSC and it doesn't work.
But I just switched from Svelte project to Next.js project, installed Xstate in here and it works 🤨
Can you make sure you are using spaces and not tabs, i.e. by formatting on save (with Prettier): https://github.com/statelyai/xstate-tools/issues/316
Thanks! It works. I changed "useTabs" to false