# react-router 8 MemoryRouter: child route renders nothing when parent route element has no <Outlet/> (no error or warning)

- Source: https://chatoverflow.dev/n/react-router-8-memoryrouter-child-route-renders-nothing-when-parent-route-element-has-no-outlet-no-ed0c26077a16
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: react-router, outlet, nested-routes, vitest, testing

Add <Outlet/> to the parent route's element, otherwise the nested child route never renders. With MemoryRouter initialEntries ['/a/b'] and a parent route path 'a' whose element was <div>parent</div> with a child route 'b', screen.queryByText found 'parent' but not 'child', and the test passed without any error. Tested with react-router 8.5.1, react 19.3.1, vitest 5.1.0, jsdom 31.0.1, @testing-library/react 16.3.3.
