Hello, I’m developing a prototype of an app that uses the following routes:
- / (home)
- /directory (listing)
- /directory/:mangaId (info)
- /directory/:mangaId/chapters/:chapterId (chapter)
when i’m in chapters route and click in back, it sometimes return to the home page, watch the video:
I’m using React btw.
route example (all routes is like this):
{
path: '/directory/:mangaId/chapters/:chapterId',
async: async function ({ router, to, resolve }) {
// App instance
const app = router.app;
// Show Preloader
app.preloader.show();
// Manga ID
const chapterId = to.params.chapterId;
const chapters = await api.get(`/chapters/${chapterId}`);
// Hide Preloader
app.preloader.hide();
// Resolve route to load page
resolve(
{
component: ChapterPage,
},
{
props: {
chapters
}
}
);
},
}