Hi, I switched from Declarative Mode to Framework Mode and I’m struggling with type-safe routing, specifically with <Link to={}/>.
In Declarative Mode, I used to have a hardcoded object with my paths, for example:
const routes = {
index: "/",
dashboard: "/dashboard",
...
}
Then whenever I needed a link, I would just do:
<Link to={routes.dashboard} />
Now, because of how paths are declared in routes.ts, I’m not sure what’s the best way to keep my <Link /> type-safe.
Any suggestions on how to approach this?