Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add Support for Router Modals #262

Open
chiqui3d opened this issue Nov 27, 2024 · 3 comments
Open

Feature Request: Add Support for Router Modals #262

chiqui3d opened this issue Nov 27, 2024 · 3 comments
Labels
feature-request New feature or request

Comments

@chiqui3d
Copy link

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

@zetavg zetavg added the feature-request New feature or request label Dec 1, 2024
@natew
Copy link
Collaborator

natew commented Jan 7, 2025

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

@chiqui3d
Copy link
Author

chiqui3d commented Jan 7, 2025

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.

@natew
Copy link
Collaborator

natew commented Jan 7, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants