-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Component prop stopped working on v6.11.0 #10416
Comments
@brophdawg11 Did #10287 break this? |
I was wondering why my application suddenly wasn't working the way it should anymore... |
Hm, yeah, this is a bit of a miscommunication. For example, <Routes>
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
<Route path="about" element={<About />} />
</Route>
</Route> However, if you use <Routes>
<Route path="/" Component={Layout}>
<Route index Component={Home} />
<Route path="about" Component={About} />
</Route>
</Route> The reason We could add support back - but it's a pretty significant de-optimization to use @diegohaz and @JasperHorn What do you folks think? Would you want |
For my use case, I can move back to |
I was working on an older application that I hadn't written myself, and I had recently moved it to recent version of react-router. For this, I can move to using element without too much effort - the effort was in finding out why it wasn't working. You could revert in 6.11.1 and continue in 7.0.0. But I also see why you might not want to bump the major version just for this... |
We also had not obvious issue while build, I would also use |
This is fixed by #10434 and should be available once 6.11.1 is released |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of React Router are you using?
6.11.0
Steps to Reproduce
Visit https://stackblitz.com/edit/github-ceeupc?file=src%2FApp.tsx
Expected Behavior
Route components passed to the
Component
prop are rendered:https://stackblitz.com/edit/github-ceeupc-vzvsw6?file=src%2FApp.tsx
Actual Behavior
Route components passed to the
Component
prop aren't rendered.The text was updated successfully, but these errors were encountered: