#386 Inside React Query
I've been asked a lot lately how React Query works internally. How does it know when to re-render? How does it de-duplicate things? How come it's framework-agnostic?
Codedamn is a new platform focused on hands-on learning and building projects, with GPT3-powered assistance when you’re stuck. Imagine learning the full stack of React: Next.js, useSWR, Node, Serverless Databases, edge computing, and so much more - interactively right from your browser window. A single subscription unlocks everything on the platform.
As Wix grew and advanced, utilizing new technologies, building a low code editor required a lot of, you guessed it, coding. Throughout the process, my feeling about web development grew to be quite similar to what I thought before creating Wix: it’s too messy, involving too many tools, too much repetitiveness, and too much effort.
While it is one of the most underused patterns in React, the Children Prop Pattern is a powerful tool for building reusable components. But it has another aspect that makes it even more interesting to understand and use: re-renders optimization.
For an app that has thirty pages, that's the same code repeated thirty times, so it would be ideal to be able to define it all in one place. This aligns with the Don't Hardcode Repetitive Markup guideline in the Tao of React. Anywhere we can reduce repetition with a little clear abstraction is worth looking into.
A summary of modern React best practices, with tips that can be applied to real-world applications.
And we'll wrap up with a nice tutorial to replace Buffer and a cool approach to stylesheets.