Skip to content
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

[react-events] Use context.objectAssign in Tap responder #16748

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Sep 11, 2019

This changes usage of object spread syntax to use the shared Object.assign helper function that we have on context, so the size of compiled Tap responder is smaller in file size (as we won't need the polyfills). According to size-bot, there's a nice 15% size saving from this change.

@sizebot
Copy link

sizebot commented Sep 11, 2019

Details of bundled changes.

Comparing: ab4951f...f120038

react-events

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-events-focus.development.js 0.0% 0.0% 10.91 KB 10.91 KB 2.36 KB 2.36 KB UMD_DEV
react-events-focus.production.min.js 0.0% 🔺+0.1% 4.09 KB 4.09 KB 1.39 KB 1.39 KB UMD_PROD
react-events-context-menu.development.js 0.0% -0.1% 2.67 KB 2.67 KB 1000 B 999 B UMD_DEV
react-events-swipe.development.js 0.0% -0.1% 5.99 KB 5.99 KB 1.62 KB 1.62 KB UMD_DEV
react-events-input.production.min.js 0.0% 🔺+0.1% 1.83 KB 1.83 KB 977 B 978 B UMD_PROD
react-events-swipe.production.min.js 0.0% -0.1% 2.43 KB 2.43 KB 1.1 KB 1.1 KB UMD_PROD
ReactEventsTap-dev.js +0.2% +0.1% 15.89 KB 15.92 KB 3.48 KB 3.48 KB FB_WWW_DEV
ReactEventsTap-prod.js 🔺+0.3% 🔺+0.1% 12.89 KB 12.93 KB 2.88 KB 2.89 KB FB_WWW_PROD
react-events-input.development.js 0.0% +0.1% 4.33 KB 4.33 KB 1.39 KB 1.39 KB NODE_DEV
react-events-swipe.development.js 0.0% -0.1% 5.81 KB 5.81 KB 1.58 KB 1.58 KB NODE_DEV
react-events-context-menu.production.min.js 0.0% 🔺+0.2% 1.19 KB 1.19 KB 664 B 665 B NODE_PROD
react-events-scroll.development.js 0.0% +0.1% 6.29 KB 6.29 KB 1.65 KB 1.65 KB UMD_DEV
react-events-hover.production.min.js 0.0% 🔺+0.1% 2.93 KB 2.93 KB 1.07 KB 1.07 KB NODE_PROD
react-events-focus.development.js 0.0% 0.0% 10.73 KB 10.73 KB 2.31 KB 2.31 KB NODE_DEV
react-events-press.development.js 0.0% 0.0% 20.51 KB 20.51 KB 4.77 KB 4.77 KB NODE_DEV
react-events-press.production.min.js 0.0% 0.0% 6.78 KB 6.78 KB 2.56 KB 2.56 KB NODE_PROD
react-events-keyboard.development.js 0.0% 0.0% 5.61 KB 5.61 KB 1.99 KB 1.99 KB UMD_DEV
react-events-tap.development.js -0.4% -1.9% 16.31 KB 16.24 KB 3.59 KB 3.52 KB UMD_DEV
react-events-tap.production.min.js -0.2% -2.4% 5.78 KB 5.77 KB 2.27 KB 2.22 KB UMD_PROD
react-events-keyboard.development.js 0.0% -0.1% 5.43 KB 5.43 KB 1.94 KB 1.93 KB NODE_DEV
react-events-tap.development.js -11.2% -17.9% 18.08 KB 16.06 KB 4.23 KB 3.47 KB NODE_DEV
react-events-drag.production.min.js 0.0% 🔺+0.1% 2.87 KB 2.87 KB 1.37 KB 1.37 KB NODE_PROD
react-events-tap.production.min.js -12.7% -15.4% 6.49 KB 5.67 KB 2.6 KB 2.2 KB NODE_PROD

Generated by 🚫 dangerJS against f120038

@trueadm trueadm merged commit 3a49dff into facebook:master Sep 11, 2019
@trueadm trueadm deleted the tap-object-assign branch September 11, 2019 15:06
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.

4 participants