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

Adding react is export support #13281

Closed
wants to merge 3 commits into from
Closed

Adding react is export support #13281

wants to merge 3 commits into from

Conversation

mrgurdeep
Copy link

Adding support so that each function of ReactIs is individually accessible

This solve the issue mentioned in #13250

And then finally provide a feature requested in #13272

What is the issue
Tree shaking not enabled with react-is.

import * as ReactIs from "react-is";
ReactIs.isValidElementType(<div />); // true

Expected behavior
Allow importing individual modules from the package.

import { isValidElementType } from "react-is";
isValidElementType(<div />); // true

Adding support so that each function of ReactIs is individually accessible
Lint Fixed
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@pull-bot
Copy link

Details of bundled changes.

Comparing: 840cb1a...4dc0620

react-is

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-is.development.js +12.6% +10.1% 4.68 KB 5.28 KB 1.29 KB 1.42 KB UMD_DEV
react-is.production.min.js 🔺+18.8% 🔺+20.7% 1.89 KB 2.25 KB 789 B 952 B UMD_PROD
react-is.development.js +13.1% +11.2% 4.5 KB 5.09 KB 1.24 KB 1.38 KB NODE_DEV
react-is.production.min.js 🔺+17.5% 🔺+18.7% 1.84 KB 2.16 KB 722 B 857 B NODE_PROD
ReactIs-dev.js +12.9% +10.8% 4.58 KB 5.17 KB 1.27 KB 1.4 KB FB_WWW_DEV
ReactIs-prod.js 🔺+24.8% 🔺+17.9% 3.68 KB 4.59 KB 1006 B 1.16 KB FB_WWW_PROD

Generated by 🚫 dangerJS

@mrgurdeep mrgurdeep closed this Jul 27, 2018
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.

None yet

3 participants