You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your reply, but I think you misunderstood what I mean because I am not using it to render. Sometimes, the JSX format is easier to read and maintain, so I want to use createRoutesFromChildren to build my own routes, just like this:
constroutes=createRoutesFromChildren<MyRouteObject>(<><MyRoutepath="/"element={<div/>}meta={{routeCode: 'xxx',author: 'xxx'}}/></>)// in AppconstApp=()=>useRoutes(routes)
Maybe there are some usages like this, we can customize our own Route,
and then use
createRoutesFromChildren
to create an array of routes:This use case requires the
createRoutesFromChildren
function to return props correctly. But now it only strictly returnsRouteObject
.Maybe this feature can be added? This will make routing configuration more flexible.
The text was updated successfully, but these errors were encountered: