Add React.createContext to @babel/plugin-transform-react-pure-annotat… (#11685)
Co-authored-by: Jesse Thomson <jesset@qualtrics.com>
This commit is contained in:
parent
9d289c1457
commit
426acf336e
@ -12,6 +12,7 @@ const PURE_CALLS = new Map([
|
|||||||
"react",
|
"react",
|
||||||
[
|
[
|
||||||
"cloneElement",
|
"cloneElement",
|
||||||
|
"createContext",
|
||||||
"createElement",
|
"createElement",
|
||||||
"createFactory",
|
"createFactory",
|
||||||
"createRef",
|
"createRef",
|
||||||
|
|||||||
@ -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({});
|
||||||
Loading…
x
Reference in New Issue
Block a user