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

Nested Routers #1089

Open
posva opened this issue Aug 23, 2021 · 3 comments
Open

Nested Routers #1089

posva opened this issue Aug 23, 2021 · 3 comments
Labels
discussion This problem still needs more feedback enhancement New feature or request needs RFC This feature needs to go through the RFC process first
Projects

Comments

@posva
Copy link
Member

posva commented Aug 23, 2021

What problem does this feature solve?

Allow using nested memory routers to handle independent views. e.g. the messages on Twitter, or a chat.

A custom History implementation could even save the current page in local storage and restore it when reopening the app.

What does the proposed API look like?

provideRouter(createRouter(...))
// or
createNestedRouter(baseRouterOptions)
  • Could warn if history is based on HTML5
  • No initial navigation
  • Should provide these
  • Could appear in devtools
  • Could automatically unregister the history listener on unmounted
  • Should not change global configs
  • Should still be able to access the global router
@posva posva added the enhancement New feature or request label Aug 23, 2021
@posva
Copy link
Member Author

posva commented Aug 23, 2021

This would have to go through an RFC to better identify the different needs of creation/destruction of nested routers.

@posva posva added this to To Do in v4.1.0 Nov 5, 2021
@posva posva moved this from To Do to In Progress in v4.1.0 Apr 20, 2022
@posva posva added needs RFC This feature needs to go through the RFC process first discussion This problem still needs more feedback labels Jul 4, 2022
@posva posva moved this from In Progress to To Do in v4.1.0 Sep 16, 2023
@Bertie2011
Copy link

The use case I have is having independent movable windows in an app with their own navigations.
I also could imagine this being useful for plenty of gamified apps (e.g. a shop/menu sidebar that has multiple levels to it)

@brendomaciel
Copy link

It's a pretty nice feature. It would address this scenario I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This problem still needs more feedback enhancement New feature or request needs RFC This feature needs to go through the RFC process first
Projects
Status: In discussion
Status: To Do
v4.1.0
To Do
Development

No branches or pull requests

3 participants