Similar to #150 I don't think we want to create a new memory history on every render of MemoryRouter. Memory history is supposed to maintain state outside the lifetime of a single render.
I've fixed this issue by putting useRef around the createMemoryHistory to retain the same instance.
Similar to #150 I don't think we want to create a new memory history on every render of
MemoryRouter
. Memory history is supposed to maintain state outside the lifetime of a single render.I've fixed this issue by putting
useRef
around thecreateMemoryHistory
to retain the same instance.