Could MemoryRouter be persisted in localStorage? #13349
Unanswered
tylersayshi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The use case is a routed application that is embeddable in external applications. It may have access to localStorage though, so in theory the
MemoryRouter
could write it's context into localStorage and then load from there on startup.It seems hackable with
initialEntries
and auseEffect
on theRouterContext
for writing the entries into localStorage.Is there a better way? Or is this a bad idea altogether?
Beta Was this translation helpful? Give feedback.
All reactions