Closed hayesgm closed 7 years ago
Rather than track state in the mixin, the intent was let the browser history do its thing so the back button continues to work. This never removes entries from the path history, or syncs with the current url in the browser.
This will lead to odd behavior since the browser back/forward buttons will navigate to different page state than a 'Back' link in the page.
For being able to navigate forward or backward without using
History.go(-1)
, I added a simplepathHistory
state that tracks the users page changes whenever wesetState()
. My preference would be to do this in the component this is mixed into, but as far as I can tell, as we're callingsetState()
directly, there's no way in React to hook into and add in this feature from the componentreact-mini-router
is mixed into.Usage
I'd be happy to hear other suggestions on how to achieve the same goal.