Hoistable SVG Defs in React
Colocating SVG definitions with the components that use them, using portals and context. An overengineered but instructive exercise.
I’m Jules. I’m a software engineer with a background in geoscience engineering.
I’m passionate about on making ideas, systems and processes more understandable.
I believe that maps, charts, and diagrams are a great way to do that.
I’m passionate about the World Wide web, its reach, its usefulness. I believe that it is a great place to build and share useful tools for understanding.
At the moment, I’m working on making geotechnical data more useful at
Bedrock.engineer.
You can find me on the web on Twitter.
Colocating SVG definitions with the components that use them, using portals and context. An overengineered but instructive exercise.
Understanding how parent and owner components affect context updates can help you write more performant context providers
An in-depth look at what ReactDOM.flushSync does and what it’s good for.
Being aware of the distinction between parent and owner components can help you isolate updates and improve rendering performance.
There are two, similar but different component trees in React. Being aware of this difference can help you better structure your React application.