| 1 | # CPU async rendering demo |
| 2 | |
| 3 | ## What is this fixture? |
| 4 | |
| 5 | This is a demo application based on [Dan Abramov's](https://github.com/gaearon) recent [JSConf Iceland talk](https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html) about React. |
| 6 | |
| 7 | It depends on a local build of React and enables us to easily test async "time slicing" APIs in a more "real world app" like context. |
| 8 | |
| 9 | ## Can I use this code in production? |
| 10 | |
| 11 | No. The APIs being tested here are unstable and some of them have still not been released to NPM. For now, this fixture is only a test harness. |
| 12 | |
| 13 | There are also known bugs and inefficiencies in main so **don't use this fixture for demonstration purposes either yet**. Until they are fixed, this fixture is **not** indicative of React async rendering performance. |
| 14 | |
| 15 | ## How do I run this fixture? |
| 16 | |
| 17 | ### From npm version |
| 18 | |
| 19 | ``` |
| 20 | # 1: Install fixture dependencies |
| 21 | cd fixtures/unstable-async/time-slicing/ |
| 22 | yarn |
| 23 | |
| 24 | # 2: Run the app |
| 25 | yarn start |
| 26 | ``` |
| 27 | |
| 28 | ### From React source code |
| 29 | ```shell |
| 30 | # 1: Build react from source |
| 31 | cd /path/to/react |
| 32 | yarn |
| 33 | yarn build react-dom/index,react/index,react-cache,scheduler --type=NODE |
| 34 | |
| 35 | # 2: Install fixture dependencies |
| 36 | cd fixtures/unstable-async/time-slicing/ |
| 37 | yarn |
| 38 | |
| 39 | # 3: Copy React source code over |
| 40 | yarn copy-source |
| 41 | |
| 42 | # 3: Run the app |
| 43 | yarn start |
| 44 | ``` |