#How can I import lots of pages without making my App.jsx a mess?

1 messages · Page 1 of 1 (latest)

viscid zealot
#

I have approx 60-70 lines of the following:

const Page = lazy(() => import('./Pages/Page'));
const InnerPage = lazy(() => import('./Pages/PageType/Page'));
``` Is there a way for me to make this more tidy or organized?
#

And is there a way for me to create some sort of dynamic page? Aka https://domain.com/tasks/<ANYTHING_HERE>

spiral plover
#

vite's glob imports could be an option or solid-start's file system routing

#

also, don't forget that solid router supports config based routing useRoutes

viscid zealot
cobalt pewter