-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[Docs]: index.js #11269
Comments
We have several migration guides. The one you're looking for is here: https://reactrouter.com/en/main/upgrading/v6-data |
It doesn't address the specific question I had. Which of your docs addresses my specific question about |
Hmm.. since the migration guide uses this example as the current app, I think it's pretty self-explanatory. export default function App() {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/blog/*" element={<BlogApp />} />
<Route path="/users/*" element={<UserApp />} />
</Routes>
</BrowserRouter>
);
} The ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
); NOTE: You probably want to change this to In fact, you can even see this in the basic data router example (https://github.com/remix-run/react-router/blob/dev/examples/basic-data-router/src/main.tsx) import * as React from "react";
import * as ReactDOM from "react-dom/client";
import App from "./app";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>
); |
Thank you for providing those extra details. |
Describe what's incorrect/missing in the documentation
The way I learned react router was this:
Your tutorial for React Router v6 does not properly demonstrate how to transition from this to
the new React Router method.
I don't feel like doing trial and error to figure out how this needs to translate.
Please provide some guidance.
The text was updated successfully, but these errors were encountered: