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

Add React.createContext to @babel/plugin-transform-react-pure-annotat… #11685

Merged
merged 1 commit into from Jun 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,6 +12,7 @@ const PURE_CALLS = new Map([
"react",
[
"cloneElement",
"createContext",
"createElement",
"createFactory",
"createRef",
Expand Down
@@ -0,0 +1,3 @@
import { createContext } from 'react';

const context = createContext({});
@@ -0,0 +1,4 @@
{
"sourceType": "module",
"plugins": ["transform-react-pure-annotations"]
}
@@ -0,0 +1,2 @@
import { createContext } from 'react';
const context = /*#__PURE__*/createContext({});