You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add note about possible use case for memoryHistory (#3693)
While developing a widget which is meant to be embedded into websites
via an iframe, we noticed `history` taking over the parent page’s
back/forward button (not a bug, just the way browser history works). We
were able to isolate the routing to the widget by using
`memoryHistory`.
This PR just adds a tiny note that `createMemoryHistory` can be useful
for a case like that.
Copy file name to clipboardExpand all lines: docs/API.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -622,7 +622,7 @@ For more details, please see the [histories guide](/docs/guides/Histories.md).
622
622
623
623
624
624
### `createMemoryHistory(options)`
625
-
`createMemoryHistory` creates an in-memory `history` object that does not interact with the browser URL. This is useful when you need to customize the `history` used for server-side rendering, as well as for automated testing.
625
+
`createMemoryHistory` creates an in-memory `history` object that does not interact with the browser URL. This is useful when you need to customize the `history` used for server-side rendering, as well as for automated testing or cases where you cannot/should not manipulate the browser history (for example when your application gets embedded in an iframe).
0 commit comments