I need to have routing that works without changing the URL.
Before implementing this on my own, I tried to look for something by react router. I sa
MemoryHistory is a "history provider", which you can supply to React Router like this:
const memoryHistory = createMemoryHistory(options);
// In your Router configuration
Beyond the initial configuration, everything else should work exactly the same as with regular browser history.
This article describes how to use different providers with React Router: Histories