Metronic V8 React Roadmap missing in the documentation
I can't find the roadmap or the route logic in the react documentation, which makes it very difficult for the development to modify.
Replies (1)
Hi Sherf,
At the moment, we do not have a separate route logic doc page I will add a task for such documentation to our system and we will consider adding it in the subsequent releases.
Here are some tips for you on our route logic:
We are handling routing in our theme using react-router, we have two main router files in src/routing
folder:
- AppRoutes.tsx - Routes entry point.
- PrivateRoutes.tsx - Private routes entry point. (Pages are unavailable for unauthorized users).
Then for each pages module, we have a wrapper, for example, the profile module has file src/app/modules/profile/ProfilePage.tsx which contains all profile route definitions.
Then this file is imported and used inside PrivateRoutes.tsx.
const ProfilePage = lazy(() => import('../modules/profile/ProfilePage'))<Route
path='crafted/pages/profile/*'
element={
<SuspensedView>
<ProfilePage />
</SuspensedView>
}
/>
Also, you can check our guide on how to add a custom page: https://preview.keenthemes.com/metronic8/react/docs/docs/create-a-page
Regards,
Lauris Stepanovs,
Keenthemes Support Team