components are not rendering, somehow the path is exist in localhost. what i am writing inside the component not show up. I am sorry for this beginner question.
*in App.jsx
import React from 'react'
import Navbar from './components/Navbar/Navbar'
import Sidebar from './components/Sidebar/Sidebar'
import { Routes, Route } from 'react-router-dom'
import Add from './pages/Add/Add'
import List from './pages/List/List'
import Orders from './pages/Orders/Orders'
const App = () => {
return (
<div>
<Navbar/>
<hr />
<div className="app-content">
<Sidebar/>
<Routes>
<Route path='/add' element={<Add/>}/>
<Route path='/list' element={<List/>}/>
<Route path='/orders' element={<Orders/>}/>
</Routes>
</div>
</div>
)
}
export default App
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
The react-router-dom docs are very extensive, so I would suggest you read them. They do use the createBrowserRouter and data APIs for the most now it seems, but you can still find some plain component examples.