one icon indicating copy to clipboard operation
one copied to clipboard

Feature Request: Add Support for Router Modals

Open chiqui3d opened this issue 1 year ago • 3 comments

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

chiqui3d avatar Nov 27 '24 21:11 chiqui3d

Can you give me the pitch for why this is an improvement over just using layouts to render your modals?

natew avatar Jan 07 '25 02:01 natew

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.

chiqui3d avatar Jan 07 '25 02:01 chiqui3d

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.

natew avatar Jan 07 '25 02:01 natew