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
Hey I'd like to say thanks for v7! Currently moving a project from remix and it's been fairly straightforward. I really like the new routing system compared to the old as it's simplified things quite a bit.
But I'm running into an issue where I'm not sure what the best course of action is. Currently we have a few sub-packages in a monorepo that originally exported files that were suffixed with .route. I've now moved this system over export some RouteConfigEntry arrays using the relative functionality built into @react-router/dev/routes which has worked quite well. But the issue that I've run into is that the types for these sub-packages don't generate in the file system correctly. As I don't want them in the root react-router app I figured I'd use the typegen functionality in these individual packages, however it requires a root.tsx file to exist in each one, which I've done for the short term. However I'm also generating the routes in the root folder still as it's traversing my exported routes still.
I'm not sure the intention of the dev tool so I wasn't sure the best way to go about fixing this issue, but I suppose there are 2 different routes to take.
Generate the route types only for the local package/app and then run functionality for each package but would mean being able to disable root.tsx file requirement.
Traverse all the routes and generate the types in the local packages and only have one root.tsx file.
I'm happy to give this a try to get this working but I'm wanting to get an idea from everyone what the ideal behaviour would be.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey I'd like to say thanks for v7! Currently moving a project from remix and it's been fairly straightforward. I really like the new routing system compared to the old as it's simplified things quite a bit.
But I'm running into an issue where I'm not sure what the best course of action is. Currently we have a few sub-packages in a monorepo that originally exported files that were suffixed with .route. I've now moved this system over export some
RouteConfigEntry
arrays using therelative
functionality built into@react-router/dev/routes
which has worked quite well. But the issue that I've run into is that the types for these sub-packages don't generate in the file system correctly. As I don't want them in the root react-router app I figured I'd use the typegen functionality in these individual packages, however it requires a root.tsx file to exist in each one, which I've done for the short term. However I'm also generating the routes in the root folder still as it's traversing my exported routes still.I'm not sure the intention of the dev tool so I wasn't sure the best way to go about fixing this issue, but I suppose there are 2 different routes to take.
I'm happy to give this a try to get this working but I'm wanting to get an idea from everyone what the ideal behaviour would be.
Beta Was this translation helpful? Give feedback.
All reactions