Replies: 2 comments
-
The thing is Route Components do take children. Other Route Components. This is very similar to React Router 6. I'm not sure given the limitations of TS to treat children as anything other than |
Beta Was this translation helpful? Give feedback.
0 replies
-
I see. And there's no way to do a runtime check on the child to verify that it's a route? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In some routing libraries (react-router), the "Route" component can take children rather than an "element" attribute. Users who are moving from another library may expect solid-router to work the same way, and be confused when nothing renders. I suggest that Route should either be a VoidComponent, or should emit a console warning letting them know that the children will be ignored.
I ran into this today, and it was a couple hours before I figured it out.
Beta Was this translation helpful? Give feedback.
All reactions