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.19k stars 161 forks source link

Use postcss to extract styles in Expo example #239

Closed necolas closed 1 week ago

necolas commented 1 week ago

Extract styles to static CSS using postcss, as there is no existing Metro integration.

Fix #34 Ref #236

github-actions[bot] commented 1 week 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,495 2,515 1.01 +
· minified 8,686 8,688 1.00 +
react-strict-dom/dist/dom/runtime.js
· compressed 855 855 1.00
· minified 2,433 2,435 1.00 +
react-strict-dom/dist/native/index.js
· compressed 15,824 15,824 1.00
· minified 59,086 59,086 1.00
github-actions[bot] commented 1 week 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,154,662 1,167,428 1.01 +
· small with units 452,014 454,353 1.01 +
· small with variables 684,356 691,427 1.01 +
· several small 328,871 326,277 0.99 -
· large 213,974 213,474 1.00 -
· large with polyfills 149,248 150,159 1.01 +
· complex 101,737 102,335 1.01 +
· unsupported 224,149 221,856 0.99 -
css.createTheme
· simple theme 223,441 225,295 1.01 +
· polyfill theme 210,222 210,494 1.00 +
css.props
· small 246,739 246,158 1.00 -
· small with units 193,540 193,032 1.00 -
· small with variables 106,469 105,751 0.99 -
· small with variables of units 74,921 75,236 1.00 +
· large 104,618 104,339 1.00 -
· large with polyfills 37,447 37,752 1.01 +
· complex 24,099 24,291 1.01 +
· unsupported 153,062 148,315 0.97 -
· simple merge 164,192 164,064 1.00 -
· wide merge 18,323 18,301 1.00 -
· deep merge 17,953 18,005 1.00 +
· themed merge 32,912 32,985 1.00 +
necolas commented 1 week ago

Thanks @javascripter for the quick patches! LGTM now. Let me know what you think

javascripter commented 1 week ago

@necolas Thanks for testing out. Looks good to me as well!