flippyflops
Is there a way to enforce children of a particular component type?
This works as well but I guess its just a matter of preferred ergonomics. I saw Material UI implementation in solid uses children as the API for things like this, I just haven't checked if they do any enforcing of children type (I'm guessing not?) 🤔
Do you mind giving me an example of when one might use
FlowProps
? I thought it was for the case I mentioned.10 replies
Authenticated routes in SPA
I posted another solution in that GH link that I'll likely end up going with.
TL;DR;
Config-based routes seem like an after thought in
@solidjs/router
, perhaps by design? 🤷🏼♂️ Using the JSX-based approach is significantly easier to handle a groupings of "private" routes. See my comment.7 replies
Authenticated routes in SPA
There are guards on the api for resource requests via
Authenticatiion
header / bearer token. I'm using a SPA, so the server doesn't receive a request for a new page on navigate, so checking for auth needs to happen at the FE router level and this can be a request to the auth service (or internal API if that is also the auth service) but it can't only happen on the server. I already have a way to refresh a token or redirect to login upon an Unauthenticated request for a resource.7 replies