'React' must be in scope when using JSX react/react-in-jsx-scope Error
When I ran the app, the above error occurred... I think that there is a conflict with eslint after installing Babel-plugin, but I don't know the exact solution.
<App.js>
import Header from '../src/components/Header'
function App() {
return (
<Header />
);
};
export default App;
<Header.js>
import styled from 'styled-components'
const HeaderContainer = styled.div`
`;
function Header() {
return (
<HeaderContainer>Hello</HeaderContainer>
)
};
export default Header;
FYI, adding "import React from 'react'" to Header.js doesn't change anything...