You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RouteSectionProps type allows children. This creates two small problems:
I declare my pages as VoidComponent as they cannot have children, they are the whole page components, and right now passing them as the component doesn't compile.
Why allow specifying children at all? How would I specify children to a component used in a route? Does it even make sense?
If you have a suggestion for the types I'd love it, but its because route sections can have children in that is how outlets work. You inject nested route sections via props.children. So the general type for RouteSectionProps needs to at least have the potential of accepting children I think.
I see. So the component should be able to accept children, but actually only if the Route element has children, right? Sounds like it's quite possible to declare the types like this.
Describe the bug
The RouteSectionProps type allows children. This creates two small problems:
Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-pheug1?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
It just doesn't compile, without a good reason, I think.
Expected behavior
It compiles fine when given a VoidComponent.
Screenshots or Videos
No response
Platform
Additional context
It is a recent change, it used to work reasonably on 0.10.1 I think.
The text was updated successfully, but these errors were encountered: