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

Co-authored-by: Jesse Thomson <jesset@qualtrics.com>
This commit is contained in:
Jesse Thomson 2020-06-05 20:36:06 -06:00 committed by GitHub
parent 9d289c1457
commit 426acf336e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,7 @@ const PURE_CALLS = new Map([
"react",
[
"cloneElement",
"createContext",
"createElement",
"createFactory",
"createRef",

View File

@ -0,0 +1,3 @@
import { createContext } from 'react';
const context = createContext({});

View File

@ -0,0 +1,4 @@
{
"sourceType": "module",
"plugins": ["transform-react-pure-annotations"]
}

View File

@ -0,0 +1,2 @@
import { createContext } from 'react';
const context = /*#__PURE__*/createContext({});