[Bug]: Component unexpectedly rendered as Outlet #8553
Unanswered
ribedesign
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of React Router are you using?
6.2.1
Steps to Reproduce
The first Route is the wrapper route and has the element DivContainer. The DivContainer has, in the given example, 2 children: HomePage and ApplePage.
The second Route wraps all routes in element ApplePage according to: <Route path="*" element={} />.
Thanks for reviewing and hopefully fixing this issue ;-)
Expected Behavior
Expected Behavior:
I would expect the ApplePage component to be rendered only 2 times: first as child of DivContainer and second as element of the second route.
When the Outlet is removed in the HomePage component, like:
The behavior is as expected: the ApplePage component is rendered 2 times.
Therefore, I think the ApplePage component is probably unexpectedly rendered as Outlet in the HomePage component?
Actual Behavior
Actual Behavior:
ApplePage component is rendered three times, as shown above.
Beta Was this translation helpful? Give feedback.
All reactions