facebook / react-strict-dom

React Strict DOM (RSD) standardizes the development of styled React components for web and native.
https://facebook.github.io/react-strict-dom
MIT License
3.2k stars 161 forks source link

Switches native View to ViewNativeComponent #186

Closed necolas closed 3 months ago

necolas commented 3 months ago

Bypass the React Native "View" component for "ViewNativeComponent". RSD currently does all the intermediate transforms that View otherwise does in React Native.

github-actions[bot] commented 3 months ago

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better. Results Base Patch Ratio
react-strict-dom/dist/dom/index.js
· compressed 2,573 2,573 1.00
· minified 8,823 8,823 1.00
react-strict-dom/dist/dom/runtime.js
· compressed 836 836 1.00
· minified 2,365 2,365 1.00
react-strict-dom/dist/native/index.js
· compressed 15,088 15,131 1.00 +
· minified 54,987 55,059 1.00 +
github-actions[bot] commented 3 months ago

workflow: benchmarks/perf (native)

Comparison of performance test results, measured in operations per second. Larger is better. Results Base Patch Ratio
css.create
· small 1,141,003 1,138,490 1.00 -
· small with units 444,504 442,107 0.99 -
· small with variables 665,107 677,865 1.02 +
· several small 326,496 330,867 1.01 +
· large 208,408 212,215 1.02 +
· large with polyfills 149,818 148,386 0.99 -
· complex 101,112 101,382 1.00 +
· unsupported 223,942 223,659 1.00 -
css.createTheme
· simple theme 224,085 224,696 1.00 +
· polyfill theme 211,122 211,647 1.00 +
css.props
· small 241,182 240,208 1.00 -
· small with units 189,647 189,532 1.00 -
· small with variables 104,613 104,690 1.00 +
· small with variables of units 74,138 74,086 1.00 -
· large 103,420 103,360 1.00 -
· large with polyfills 25,825 25,785 1.00 -
· complex 17,948 17,994 1.00 +
· unsupported 75,839 76,053 1.00 +
· simple merge 161,101 160,991 1.00 -
· wide merge 13,667 13,701 1.00 +
· deep merge 13,471 13,539 1.01 +
· themed merge 32,004 31,817 0.99 -
necolas commented 3 months ago

This change decreased "Render + Commit" duration times on native by ~2% in a real-world app