Christian
Route Intercepting
Good Evening, I was trying to create protected routes within my app on the server side via entry-server, and it was working until I noticed that when I added ({ forward )} within the createHandler as seen below, it stopped running that function on every route and only did it on initial page load.
So then I went to the docs, looked at middleware and noticed they used @solidjs/start/server for their defineConfig, of which I tried to do so I can define my own middleware and hopefully correctly intercept routes that way but then got this error
So I'm left a little lost on how to intercept each route change server side without handling it client side. Cause client side I'm sure I can setup a createEffect and then run my auth protection, but just wanted to get it before it even renders anything.
Thanks for any help.
10 replies
Using Show with createRouteData / useRouteDat
Currently have a project setup with SolidStart, renderStream, and using createRouteData and useRouteData, my issue comes in when I want to use <Show>, I was using this on my original project which was using createResource but since I'm porting to SolidStart I figured I'd use their APIs, and now I'm getting a Hydration issue if I try to use <Show> but works fine if I just use <Suspense>
6 replies