react-strict-dom
react-strict-dom copied to clipboard
Add native support for `css.types.*` functions
These functions pass the value straight through on native.
Fix #331 Ref #337
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,514 | 2,514 | 1.00 | |
| · minified | 8,691 | 8,691 | 1.00 | |
| react-strict-dom/dist/dom/runtime.js | ||||
| · compressed | 855 | 855 | 1.00 | |
| · minified | 2,435 | 2,435 | 1.00 | |
| react-strict-dom/dist/native/index.js | ||||
| · compressed | 16,039 | 16,514 | 1.03 | + |
| · minified | 61,718 | 63,268 | 1.03 | + |
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,136,233 | 1,085,099 | 0.95 | - |
| · small with units | 500,775 | 487,391 | 0.97 | - |
| · small with variables | 658,844 | 615,387 | 0.93 | !! |
| · several small | 357,274 | 344,890 | 0.97 | - |
| · large | 204,253 | 200,403 | 0.98 | - |
| · large with polyfills | 147,967 | 141,591 | 0.96 | - |
| · complex | 103,518 | 99,796 | 0.96 | - |
| · unsupported | 214,674 | 208,768 | 0.97 | - |
| css.createTheme | ||||
| · simple theme | 226,283 | 227,363 | 1.00 | + |
| · polyfill theme | 212,082 | 211,693 | 1.00 | - |
| css.props | ||||
| · small | 231,235 | 228,779 | 0.99 | - |
| · small with units | 188,911 | 187,918 | 0.99 | - |
| · small with variables | 113,223 | 112,912 | 1.00 | - |
| · small with variables of units | 82,852 | 82,241 | 0.99 | - |
| · large | 96,909 | 94,690 | 0.98 | - |
| · large with polyfills | 38,432 | 37,973 | 0.99 | - |
| · complex | 22,328 | 21,939 | 0.98 | - |
| · unsupported | 141,563 | 141,604 | 1.00 | + |
| · simple merge | 159,103 | 158,258 | 0.99 | - |
| · wide merge | 17,026 | 16,791 | 0.99 | - |
| · deep merge | 16,707 | 16,485 | 0.99 | - |
| · themed merge | 32,703 | 32,488 | 0.99 | - |
could this PR be merged? I got error in react-native:
css.types.number(50) // TypeError: Cannot read property 'number' of undefined, js engine: hermes
or is there any workaroud?
This API isn't used at Meta, so I suggest not using it