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:
Sebastian Markbåge
2020-02-21 19:45:20 -08:00
committed by GitHub
parent 78e816032c
commit 09348798a9
116 changed files with 195 additions and 142 deletions
@@ -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';