Using <Navigate to={} /> with Layout routes?
I recently switched to file based routing and i'm having some issues using the
my tree looks like this (copied from gen, names changed)
To avoid raw strings, I've externalized my routes to a file like this:
But, if I try to
Type
I know I could take
Navigate component with _layout routesmy tree looks like this (copied from gen, names changed)
To avoid raw strings, I've externalized my routes to a file like this:
But, if I try to
Navigate to one of the routes I get this error: Type
"/_home/a" is not assignable to typeI know I could take
A_PATH.replace(HOME_PATH, '') and it'd work, but it seems odd the router "can't figure this out". Am I missing something?