Router 6 – calling child component function from the parent component – Javascript
App.js const router = createBrowserRouter([ { path: '/', element: <MainHeader />, children:[ { index: true, element: <Home />, loader :loaderHome }, ] } ]) const App = () => { return <RouterProvider router={router} />; } export default App; MainHeader.js import…