Its my routes in react
const router = createBrowserRouter([
{path: '/', element: <App />},
{path: '/createCV',
element: <Layout />,
children:
[
{path: 'info', element: <Info />}
{path: 'education', element: <Education />}
]}
])
And this is my layout component
const Layout = () => {
return (
<div className='layout'>
<Info/> {/*Here*/}
<div className='updatedCv'></div>
</div>
)
}
as u find 'here' in the second code, I Want to render component depended on the rout. for example: if route is 'localhost:/createCV/info' I need to render Info component, And if route is 'localhost:/createCV/education' I want to render Education component. And div which have classname 'updateCV' need to be always here.
In angular its router. I want something similiar if its possible in react.