I have a SPA that uses ReactRouterDom but mainly consists of class components. One of the class components needs to track changes to the address bar. I cannot rewrite the class component to a functional component. I can use a HOC but I'm wondering if I can just place a MutationObserver somewhere in the class component to keep track of address bar changes? If so, where can it be placed?