reach / router

https://reach.tech/router
MIT License
6.91k stars 326 forks source link

Unexpected remounting question #520

Open bebbi opened 1 year ago

bebbi commented 1 year ago

I think https://github.com/reach/router/issues/478 has a great question incl repro.

My use-case is to simulate an "optional parameter" in an editor that should not get remounted:

    <Router basepath="/">
      <Editor path="/" />
      <Editor path="/:someId" />
    </Router>

Once someId is processed, we navigate('/'). But then, the editor gets remounted and loses state. Can anyone help with the answer to the linked question?