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
Add React.createContext to @babel/plugin-transform-react-pure-annotations #11684
Comments
Hey @jessethomson! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
Created a PR for this: #11685 |
Can be closed now |
The |
|
Oh, I totally missed that. Awesome! |
Feature Request
(I don't actually care who works on this, but I'm happy to do it. Whatever is easier.)
Is your feature request related to a problem?
I have a React component library. When consuming applications use the library, a bunch of React.createContext calls are added to the bundle for components that aren't even being used. This shouldn't be the case as
createContext
simply takes in some parameters and returns an object.Describe the solution you'd like
Super pumped about the new
@babel/plugin-transform-react-pure-annotations
package. I would like to add React.createContext to this PURE_CALLS map.babel/packages/babel-plugin-transform-react-pure-annotations/src/index.js
Lines 10 to 23 in 71d3527
Describe alternatives you've considered.
Nothing. I'm open to them, but this seems straightforward enough.
Documentation, Adoption, Migration Strategy
Adoption and Migration are simple a npm update. Not sure is this is something that is documented or not. I'm guessing not.
The text was updated successfully, but these errors were encountered: