mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Codemod to import * as React from "react"; (#18102)
* import * as React from "react"; This is the correct way to import React from an ES module since the ES module will not have a default export. Only named exports. * import * as ReactDOM from "react-dom"
This commit is contained in:
+2
-1
@@ -7,7 +7,8 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React, {useCallback, useContext} from 'react';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useContext} from 'react';
|
||||
import {ProfilerContext} from './ProfilerContext';
|
||||
import Button from '../Button';
|
||||
import ButtonIcon from '../ButtonIcon';
|
||||
|
||||
Reference in New Issue
Block a user