Problems with creating components using react
P粉762730205
P粉762730205 2023-09-16 18:36:34
0
1
620

I did have some issues, I created a React project and then another .jsx for my component, but when I added it to "app.jsx" it didn't work, I saw 'header' is declared, but its value is never read. ts(6133)' This is the code for APP.JSX

import './App.css'
import header from './header.jsx';
function App() {

  return (
    <div className="App">
      <header/>
    </div>
  )
}
export default App

Here is the code HEADER.JSX

function header() {
    return (  
<div className='header'>
</div>
    );
}
export default header;```
ı just want to connect app.jsx and header.jsx

P粉762730205
P粉762730205

reply all(1)
P粉052724364

Rename component header to Header, just like in React, components start with a capital letter. https://pusher .com/blog/troubleshoot-react-errors/#not-starting-component-names-with-a-capital-letter

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template