리액트 React

    Outlet 을 사용하여 Navigation 구현하기 (react-router-dom)

    Outlet 이란 공식 문서에서 가져왔다. An should be used in parent route elements to render their child route elements. This allows nested UI to show up when child routes are rendered. If the parent route matched exactly, it will render a child index route or nothing if there is no index route. // 부모 컴포넌트 const router = createBrowserRouter([ { path: "/", element: , errorElement: , children: [ { path: "contacts..