Our great sponsors
-
proposal-record-tuple
ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!
-
react-tracked
State usage tracking with Proxies. Optimize re-renders for useState/useReducer, React Redux, Zustand and others.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Great question, this is discussed in the proposal, I recommend having a read: https://github.com/tc39/proposal-record-tuple#why-introduce-new-primitive-types-why-not-just-use-objects-in-an-immutable-data-structure-library
The best, and perhaps only approach I have found so far is react-tracked. It does some internal tracking with proxies that I don't quite understand, but it actually works as advertised with a very minimal API.