Passing signals as props in a Route component
Hello, I'm trying to render children elements of a route (solid router) while also passing signals as props in a route component.
My current implementation looks like this:
but when I read
props.children
in the ProtectedRoutes
component, it gets interpreted as an array of component and does not render based on
the current path.
Doing this works (props.children render well in ProtectedRoutes as it become a BoundFunctionObject) but then I can't pass props to ProtectedRoutes (at least there does not seems to be way to do it ?)
I also would want to avoid using Context as this seem overkill for my use case (maybe i'm wrong?).
I would appreciate if someone could give me a hint as to how I could manage to do this 🙂4 Replies