Skip to content

Instantly share code, notes, and snippets.

how to profile a built react app

  1. install react devtools
  2. then in vite.config.ts

const profiling = isProduction && {
 "react-dom/client": "react-dom/profiling",
@midanosi
midanosi / run_prettier.sh
Created March 9, 2021 15:20
run prettier on all jsx files in src folder
prettier --config .prettierrc.json --write src/**/*.jsx
@midanosi
midanosi / xstate_debug.html
Created March 9, 2021 15:13
xstate debugging code
<style>
body::before {
content: attr(data-state);
font-size: 2rem;
font-family: monospace;
position: absolute;
padding: 1rem;
z-index: 99;
right: 0;
top: 50%;