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

Attempt to use Flow's new StringPrefix feature #171

Open necolas opened 4 months ago

necolas commented 4 months ago

Fix #71

github-actions[bot] commented 4 months ago

compressed-size: runtime library

Size change: 0.00 kB Total size: 20.35 kB

View unchanged | Filename: gzip (minify) | kB size | kB change | % change | | :--- | :--- | :--- | :--- | | `./packages/react-strict-dom/dist/dom/index.js` | **2.94** (8.79) | **0.00** (0.00) | **0.0%** (0.0%) | | `./packages/react-strict-dom/dist/dom/runtime.js` | **0.95** (2.33) | **0.00** (0.00) | **0.0%** (0.0%) | | `./packages/react-strict-dom/dist/native/index.js` | **16.45** (53.21) | **0.00** (0.00) | **0.0%** (0.0%) |
github-actions[bot] commented 4 months ago

workflow: benchmarks (native)

Comparison of benchmark test results, measured in operations per second (higher is faster.) Suite Base Patch Ratio
css.create
· small 1,147,308 1,152,530 1.00 +
· small with units 449,318 448,615 1.00 -
· small with variables 685,851 673,815 0.98 -
· several small 328,188 330,084 1.01 +
· large 214,801 216,107 1.01 +
· large with polyfills 154,010 152,267 0.99 -
· complex 105,327 104,393 0.99 -
· unsupported 231,619 233,296 1.01 +
css.createTheme
· simple theme 226,291 225,584 1.00 -
· polyfill theme 213,384 213,392 1.00 +
css.props
· small 235,566 237,887 1.01 +
· small with units 186,777 187,395 1.00 +
· small with variables 105,128 105,478 1.00 +
· small with variables of units 75,260 75,083 1.00 -
· large 102,550 102,049 1.00 -
· large with polyfills 25,978 26,162 1.01 +
· complex 18,084 18,224 1.01 +
· unsupported 75,234 75,443 1.00 +
· simple merge 160,836 160,580 1.00 -
· wide merge 13,748 13,875 1.01 +
· deep merge 13,561 13,650 1.01 +
internals
· extractStyleThemes 425,401 424,882 1.00 -
· flattenStyle 654,521 654,518 1.00 -
nmn commented 4 months ago

There seems to be a Flow bug with the StringPrefix type still when being used in an object type as in the PR.

necolas commented 4 months ago

This is not ready to merge, I put it up for the flow team. We've been talking about the issues with the API and it's translation to TS. They're looking into it