Bug in Middleware History Replay for DevTools for POP Action #164
Description
Was playing with the current master version because it looked pretty cool and I noticed an issue with the redux devtool time time traveling. I spoke to @taion on Discord about it but wanted to make an issue because Im curious about how it can be ultimately solved and can track it easier this way.
Currently the syncHistoryToStore will update the location object if you reset actions via the redux-devtools. This works really well and is really awesome but has an issue when the the last action to be applied is a POP. The POP happens typically because the user navigated with the URL bar or opened the page for the first time. The POP can't be applied correctly though so the URL bar is not correctly updated even though the reducer data.
This results in the URL being different from what is actually rendering and is pretty confusing.
One thought I had is to dispatch an action instead of calling the history API in this case, resulting in a another action being added to devTools, "showing" the user that you can't replay that far back. This dispatch could also be a REPLACE
instead of a POP
which would ensure the URL will match the reducer state. Im eager to hear/see other solutions though.