Feature Request: Add Support for Router Modals
Please add support for router modals. Here's an example of what I'm currently using:
https://github.com/oedotme/generouted/tree/main/packages/react-router#type-safe-global-modals
Can you give me the pitch for why this is an improvement over just using layouts to render your modals?
Advantages of having modals in the same directory as routes (distinguished by a + prefix) and managing them with the useModals hook, which also works natively in React Native:
• Simplifies file structure by colocating related routes and modals. • Provides a clear, standardized naming convention. • Enables native state management without extra libraries. • Ensures seamless cross-platform support for web and React Native.
On first look it feels a bit magical, also like we could make this work with existing layouts maybe. But will have to spend more time on it.