SolidJSS
SolidJSโ€ข3y agoโ€ข
2 replies
Vexcited

Is there a better way to make authenticated routes ?

Hey! Anybody knows if there's a better way to write specific routes that can be only accessed when a certain condition is fulfilled ? (See attachment: for now in every pages component I check manually with a Show and if true, then redirect to a fallback page using Navigate)

I say "better way" because I honestly don't know if there's anything else better than that

No Solid-Start, no SSR, only SPA (vite + vite-plugin-solid) and @solidjs/router

Thanks !
code.png
Was this page helpful?