-1

1

Hi,I want to code something about REACT COMPONENT. When I type these two lines in Visual Studio Code:

import React from 'React';
import ReactDOM from 'react-dom'.;

As screenshot shown,VS suggests me to delete these two lines.
Do we no longer need to import 'react' and 'react-dom' nowadays?

2

Tanzim Siddiqee
  • 532
  • 3
  • 14

1 Answers1

-1

2 things here :

First, it says to remove because it is an unused import.

Second, to make sure this a React Component, you have to declare the import.

Le D
  • 115
  • 7