Replies: 1 comment 1 reply
-
|
Type-safety features are only for Framework Mode, adding them to Data Mode will transform Data Mode in framework mode anyway, e.g. for Why not use Framework Mode? You can even disable SSR if that's the reason to use Data Mode. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm very grateful for the work that's been done on React Router, particularly backporting Remix features to Data Mode!
Are there any plans to backport some of the type safety, too? I'm not sure how much of Framework Mode's typegen logic could be reused, but I think it would be very handy even if at least a strongly-typed
hreffunction could be inferred from the arguments tocreateBrowserRouter.In userland it's common to implement a custom type-safe path builder with nested objects/methods, but it basically duplicates the route tree. And it gets hard to read when trying to use this path builder in deeply nested RouteObjects, because it typically returns absolute paths.
Any thoughts or even patterns that make a userland fix nicer? Or any packages that do this? I couldn't find any that infers from RouteObjects? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions