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
I expected the nested route's component to be rendered. When that expectation failed I opened the developer console and expected an error or a warning.
What is actually happening?
The parent has no component so nothing renders in the router view, which terminates rendering before the child component can be rendered. The router-view does not produce a console error or warning when it has been included in the template even though it has not been provided a component to render by the router.
This issue has a lot of overlap with #2105, but this issue is focused on the developer experience rather than adding functionality to support the desired syntax. There are reasonable workarounds proposed in #2105, but they don't address the fact that developers who fall into this pattern have to spend time and effort debugging this undefined behavior due to the lack of feedback from the library. This deviates from the expectations established by the useful console warnings provided when using named routes incorrectly.
Some solutions to this problem that were not explored in #2105 include:
Warning about router views with no component in the console
Adding more explicit requirements to the documentation. All router views must specify a component containing a router view to propagate rendering to child route components
The text was updated successfully, but these errors were encountered:
Version
3.1.2
Reproduction link
https://jsfiddle.net/83t0qfhk/1/
Steps to reproduce
What is expected?
I expected the nested route's component to be rendered. When that expectation failed I opened the developer console and expected an error or a warning.
What is actually happening?
The parent has no component so nothing renders in the router view, which terminates rendering before the child component can be rendered. The router-view does not produce a console error or warning when it has been included in the template even though it has not been provided a component to render by the router.
This issue has a lot of overlap with #2105, but this issue is focused on the developer experience rather than adding functionality to support the desired syntax. There are reasonable workarounds proposed in #2105, but they don't address the fact that developers who fall into this pattern have to spend time and effort debugging this undefined behavior due to the lack of feedback from the library. This deviates from the expectations established by the useful console warnings provided when using named routes incorrectly.
Some solutions to this problem that were not explored in #2105 include:
The text was updated successfully, but these errors were encountered: