Generate React app
Generate React app is an experimental feature that helps you generate a basic React app from your state machine.
In the Code panel, use Generate React app to generate the files required to run a React app using your state machine. You can copy the code from the generated files, or use Open Sandbox to open your generated React app in CodeSandbox. You can also use the Enhance app button to generate a React UI using Stately AI.
Generate React app generates code for use with XState V5. Read about how to migrate from XState V4 to V5.
You have limited number of generations available to use each month. The number of available generations is reset at the beginning of each calendar month.
Enhance app​
Use the Enhance app button to generate an enhanced user interface after generating your React app. Once generated, the dropdown menu in the top right of the modal gives you options to preview three different versions of your enhanced app, as well as the default app generated before the enhancement.