I am trying to create a component with typescript but I am getting the following error in the terminal yet I already installed react and react-dom using npm.
ERROR in ./main.tsx error TS2307: Cannot find module 'react'.
Oooh I see.. Try this
You also need to install the typescript definition files for react. You can do that using npm as shown below
npm install @types/react