0

enter image description here

it says 'header' is declared but its value is never read.

import header from "./components/header.tsx";

function App() {
  return (
      <header />
  );
}

export default App;

tried changing path nothing happens

Audun Hilden
  • 330
  • 3
  • 13
Preetham
  • 5
  • 2
  • 1
    Custom React components are expected to be capitalised, lower case JSX is considered to be standard HTML not a React component. See: [ReactJS component names must begin with capital letters?](https://stackoverflow.com/q/30373343/1650337) – DBS Jul 28 '23 at 09:28

1 Answers1

0

React requires that the first letter of components be capitalized.

Take a look at the example below.

export function Header() {
      return (
            <>
              Header
            </>
      )
}
import { Header } from "./components/header.tsx";

function App() {
  return (
      <Header/>
  );
}

export default App;
Audun Hilden
  • 330
  • 3
  • 13