Pass `path` to `getId` so screens can be identified by URL
A
Amirreza Vakili
In my app i have some URL schemes like
brand/*
or category/*
which rest of the URL is unstructured with no params, I needed the ID to be based on the path instead. Since getId
can't see the path, there's no way to reuse a screen based on its URL.Proposal: pass the route's
path
to getId
as well:getId: ({ path, params }) => path ?? params.id
path
would be optional (undefined when navigating without a URL), so existing getId
functions keep working.