| 1 | # React Compiler Playground |
| 2 | |
| 3 | An interactive playground to demonstrate, test, and have fun with React Compiler. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | ```sh |
| 8 | # Build React Compiler from source and install Playground dependencies. |
| 9 | $ yarn |
| 10 | |
| 11 | # Or similarly |
| 12 | $ npm install |
| 13 | ``` |
| 14 | |
| 15 | ## Development |
| 16 | |
| 17 | ```sh |
| 18 | # Start the local development server with |
| 19 | $ yarn dev |
| 20 | |
| 21 | # Or |
| 22 | $ npm run dev |
| 23 | |
| 24 | # Rerun the following (in a separate terminal window) when React Compiler |
| 25 | # is changed locally to keep Playground in sync. |
| 26 | $ yarn |
| 27 | ``` |
| 28 | |
| 29 | ## Testing |
| 30 | ```sh |
| 31 | # Install playwright browser binaries |
| 32 | $ npx playwright install --with-deps |
| 33 | # Run tests |
| 34 | $ yarn test |
| 35 | ``` |
| 36 | ## Deployment |
| 37 | |
| 38 | This project has been deployed using Vercel. Vercel does the exact same thing as we would |
| 39 | locally, by running `yarn` at the install step in the Playground directory to build |
| 40 | React Compiler from source and [symlink](https://classic.yarnpkg.com/en/docs/cli/link) it as its dependency. |
| 41 | This means that Playground is automatically deployed on every push and pull requests will reflect |
| 42 | the behaviors of React Compiler of that commit. |