- React-dom is just a wrapper for implementing native methods.
- One can write it themselves and implement for any host.
- Instead of governing how a component looks via props, implement multiple variants of it. Ex. Buttn --> PrimaryButton, SecondaryButton, etc.
- When a component props are boolean only - one can prefer to have multiple variants instead since whenever we’re calling we already know which one we want.
Tools for dependecy visualisations
- npx arkit
- Dependency-cruiser
- Madge
- Python pyan
- Persper/js-callgraph
- Instead of using imports from index.js, use specific imports to make sure bundle sizes are automatically less.
5. Building the New Facebook with React and Relay | Frank Yan Building The New Facebook With React and Relay | Ashley Watkins
- Render as you fetch - Use Suspense, etc. via React - A new paradigm on how to render data with loading state
- Fetch minimal stuff to render accordingly. Do not wait for un-necessary data to be fetched to show what can already be shown
- A brief history of many Facebook libraries and how React came into being alongwith a brief history of the web as we know it.
- Introducing Fast Refresh - Alternate to Hot Module replacement, built in react stuff
- Many useful React devtools enhancements to make it more robust and useful