Aller au contenu principal

Records & Tuples for React

· Une minute de lecture
Sébastien Lorber
Editeur - Mainteneur de Docusaurus
🇫🇷 Non traduit :/
Malheureusement, cette page n'a pas encore été traduite en français. Reviens un peu plus tard!

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.


🔗 Read More

❤️️ Tu as aimé cet article ? Retweet le! 🙏

Ne manque pas le prochain email !