Closed redasalmi closed 1 week ago
Hi, @redasalmi The following PR corrected the document: https://github.com/remix-run/react-router/commit/6c7c5147c6e434d6d2350d1762ab8f4fb6287069
yep, it does fix it. I'll test it again once it's released and close this issue. Thanks for flagging this out @river0g :100:
What version of React Router are you using?
v7
Steps to Reproduce
export const routes: RouteConfig = [ index("./home.tsx"), route("about", "./about.tsx"),
layout("./auth/layout.tsx", [ route("login", "./auth/login.tsx"), route("register", "./auth/register.tsx"), ]),
route("concerts", [ index("./concerts/home.tsx"), route(":city", "./concerts/city.tsx"), route("trending", "./concerts/trending.tsx"), ]), ];
I see that in the
route
helper function definition that it expects a second string argument, by adding that it fixes the issue but it'll render the child routes under it as nested layouts. this could be just a documentation issue but copying a lot of examples from thedev
branch routing guide crashes the app https://reactrouter.com/dev/guides/start/routing