mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
We know from Fiber that inline objects with more than 16 properties in V8 turn into dictionaries instead of optimized objects. The trick is to use a constructor instead of an inline object literal. I don't actually know if that's still the case or not. I haven't benchmarked/tested the output. Better safe than sorry. It's unfortunate that this can have a negative effect for Hermes and JSC but it's not as bad as it is for V8 because they don't deopt into dictionaries. The time to construct these objects isn't a concern - the time to access them frequently is. We have to beware the Task objects in Fizz. Those are currently on 16 fields exactly so we shouldn't add anymore ideally. We should ideally have a lint rule against object literals with more than 16 fields on them. It might not help since sometimes the fields are conditional.
react-server
This is an experimental package for creating custom React streaming server renderers.
Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.
Use it at your own risk.