Skip to main content

Records & Tuples for React

· One min read
Sébastien Lorber
Docusaurus maintainer

Records & Tuples, a very interesting proposal, has just reached stage 2 at TC39.

They bring deeply immutable data structures to JavaScript.

But don't overlook their equality properties, that are VERY interesting for React.

A whole category of React bugs are related to unstable object identities:

  • Performance: re-renders that could be avoided
  • Behavior: useless effect re-executions, infinite loops
  • API surface: unability to express when a stable object identity matters

I will explain the basics of Records & Tuples, and how they can solve real world React issues.

hero

🔗 Read More


❤️️ Did you like this article? Retweet it! 🙏

Don't miss the next email!