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:
@@ -7,7 +7,8 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React, {Fragment} from 'react';
|
||||
import * as React from 'react';
|
||||
import {Fragment} from 'react';
|
||||
|
||||
function wrapWithHoc(Component, index) {
|
||||
function HOC() {
|
||||
|
||||
Reference in New Issue
Block a user