Skip to content

Commit

Permalink
Add React.createContext to @babel/plugin-transform-react-pure-annotat… (
Browse files Browse the repository at this point in the history
#11685)

Co-authored-by: Jesse Thomson <jesset@qualtrics.com>
  • Loading branch information
jessethomson and Jesse Thomson committed Jun 6, 2020
1 parent 9d289c1 commit 426acf3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
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({});

0 comments on commit 426acf3

Please sign in to comment.