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
What is the new or updated feature that you are suggesting?
I want to be able to navigate to a page/route/url by using a namespace.
Context:
In the python Django framework we have something called url-namespaces which is useful to navigate to a specific url by using only a "namespace". You can read more about it here.
I think it would be nice to have something like:
// having:typeNewRouteObject=RouteObject&{name?: string}constroutes: RouteObject[]=[{path: '/',children: [{index: true,name: 'homepage'},{path: 'products/:productId',name: 'productDetail'}]}]// it would be good to be able to do:typenavigateWithNamespace=(namespace: string,parameters?: {[key: string]: string})=>void// namespace onlynavigateWithNamespace('homepage')// namespace with path parametersnavigateWithNamespace('productDetail',{productId: '8823'})
Ideally, (and this is a tricky part) the navigateWithNamespace could be typed automatically using the react-router context data (assuming that the path/routes data lives inside the context):
These are "named routes", which we used to have in the past. Because of the more dynamic nature of the current version of the library, this isn't possible and isn't something we're going to implement.
What is the new or updated feature that you are suggesting?
I want to be able to navigate to a page/route/url by using a namespace.
Context:
In the python Django framework we have something called url-namespaces which is useful to navigate to a specific url by using only a "namespace". You can read more about it here.
I think it would be nice to have something like:
Ideally, (and this is a tricky part) the
navigateWithNamespace
could be typed automatically using the react-router context data (assuming that the path/routes data lives inside the context):Why should this feature be included?
what do you think? 🤔
Thanks!
The text was updated successfully, but these errors were encountered: