Skip to content

Conversation

@mrgurdeep
Copy link

@mrgurdeep mrgurdeep commented Jul 27, 2018

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
@facebook-github-bot
Copy link
Contributor

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
Contributor

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

pull-bot commented Jul 27, 2018

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

Lint Fixed
@mrgurdeep mrgurdeep closed this Jul 27, 2018
@pgarciacamou
Copy link

#13250

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