Skip to content

Replace React utility types with $ with the namespaced ones #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

SamChou19815
Copy link
Contributor

One day, Flow will delete React$MixedElement, React$Node and all other dollar types from the global libdef, since they are considered to be internal. All these react utility types can already be used without importing React so there is no practical benefit of keeping these dollar types either.

@SamChou19815 SamChou19815 requested a review from necolas as a code owner October 16, 2024 20:24
@SamChou19815 SamChou19815 changed the title Replace React utility types with $ to the namespaced ones Replace React utility types with $ with the namespaced ones Oct 16, 2024
Copy link

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,488 2,488 1.00
· minified 8,586 8,586 1.00
react-strict-dom/dist/dom/runtime.js
· compressed 850 850 1.00
· minified 2,404 2,404 1.00
react-strict-dom/dist/native/index.js
· compressed 15,651 15,651 1.00
· minified 58,387 58,387 1.00

Copy link

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,130,847 1,149,187 1.02 +
· small with units 449,763 452,137 1.01 +
· small with variables 684,939 681,937 1.00 -
· several small 329,191 330,143 1.00 +
· large 214,591 215,842 1.01 +
· large with polyfills 150,305 149,182 0.99 -
· complex 103,080 102,001 0.99 -
· unsupported 224,090 223,849 1.00 -
css.createTheme
· simple theme 222,113 221,481 1.00 -
· polyfill theme 208,422 209,179 1.00 +
css.props
· small 249,412 249,339 1.00 -
· small with units 192,623 194,878 1.01 +
· small with variables 106,626 107,510 1.01 +
· small with variables of units 75,758 76,304 1.01 +
· large 106,716 106,806 1.00 +
· large with polyfills 37,630 37,696 1.00 +
· complex 24,202 24,328 1.01 +
· unsupported 149,049 150,648 1.01 +
· simple merge 165,075 166,947 1.01 +
· wide merge 18,426 18,238 0.99 -
· deep merge 17,750 17,879 1.01 +
· themed merge 32,113 32,281 1.01 +

@necolas necolas closed this in 13f3958 Oct 16, 2024
@necolas
Copy link
Contributor

necolas commented Oct 16, 2024

Thanks Sam

@SamChou19815 SamChou19815 deleted the replace-react-dollar-types branch October 16, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants