I am using VSCode and in official docs as well as many videos I have seen that we do not have to always import React from 'react'
but if I try doing that it just throws an error and I have to add it eventually. I have the latest version of React as you can see below but not getting what exactly is the issue here.
I have tried this answer but it is also not working for some reason.
Here is my package.json:
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "^1.1.5",
Here is the console log:
'React' must be in scope when using JSX react/react-in-jsx-scope
For instance this is Home.jsx:
import './home.scss';
const Home = () => {
return <div className='home'>Hello</div>;
};
export default Home;