Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Last active February 11, 2021 19:59
Show Gist options
  • Save ryanflorence/2c50e77768e3f88b1c7251ef95ed01d3 to your computer and use it in GitHub Desktop.
Save ryanflorence/2c50e77768e3f88b1c7251ef95ed01d3 to your computer and use it in GitHub Desktop.
@nathanforce
Copy link

nathanforce commented Feb 11, 2021

It seems that modifying forceRefresh after initialization is unsupported. Has anyone had success with the examples here?

Comment from Michael on the prop:
remix-run/history#477 (comment)

BrowserRouter source (history is never reinitialized):
https://github.com/ReactTraining/react-router/blob/346153e38365e6a88657ce2e4e5acada290fc430/packages/react-router-dom/modules/BrowserRouter.js#L10-L16

The suggested solution looks to be using key, but that would result in a full remount of the app tree below Router, which is (probably) undesirable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment