react-codemod icon indicating copy to clipboard operation
react-codemod copied to clipboard

update-react-imports adds extra import * from React

Open anark opened this issue 3 years ago • 10 comments

When an import is defined as

import React, { useState } from 'react'

(usually due to automatically added imports)

The update-react-imports codemod transforms it to

import { useState } from 'react';
import * as React from 'react';

Instead of just

import { useState } from 'react';

anark avatar Oct 26 '20 19:10 anark