cd frontend
# Install dependencies
yarn
# Recompile when anything changes
yarn watch
Then, open http://localhost:8081 in your browser.
I suggest editing this project using VSCode. VSCode will automatically suggest a small set of extensions that will surface type and lint errors directly in your editor. It will also auto-format files on save, reducing the need to manually fix lint errors.
-
To debug React performance issues:
- Install the React Chrome extension, and check Highlight Updates to visualize which components are re-rendering
- Add
?react_perf
to the browser URL, run a Performance profile, and expand User Timings to see a flame graph of exactly what work is being done while re-rendering - Yarn install
why-did-you-update
and add it to index.tsx to visualize why components are re-rendering
-
To debug data changes in the Babydux store, add the
withLogger
decorator to the store and open your devtools console -
To debug tricky unit test failures:
- Set a breakpoint in your code with the
debugger
pragma - Run
yarn test:debug
- Set a breakpoint in your code with the