reactjsmenureact-admincustom-pages

How can I create a custom page with #react-admin without the menu sidebar like login page?


I am using react-admin previously admin-on-rest. I want to create a custom page that doesn't show the Menu sidebar, like Login page. I will use this page reset user's password. How can I do that?


Solution

  • This is not obvious in the documentation but the Route actually accepts a noLayout prop:

    <Admin
        customRoutes={[
            <Route
                path="/custom"
                component={CustomRouteNoLayout}
                noLayout
            />,
            <Route
                path="/custom2"
                component={CustomRouteWithLayout}
            />,
        ]}
    >