Facing an issue where “NewEntryCategory” page is receiving the state(reducer) of the previous NewEntryCategory page as it still remains in the DOM. Is there any way to force removal of the IonPage from the DOM?
Long navigation story:
- Visit EntryList page, that lists entries
- Navigate to NewEntryCategory page using history.push
- NewEntryCategory contains buttons that navigate to NewEntryName page using history.push
- Within NewEntryName page it is possible to get back to EntryList page with a button that uses history.replace
- Navigate to NewEntryCategory page using history.push, yet it uses the old state as it remains in the DOM
In essence, I want to clear/delete the old DOMs that are nolonger part of useHistory.
EntryList --[push]–> NewEntryCategory --[push]–> NewEntryName --[replace]–> EntryList
NewEntryName IonPage gets removed from the DOM due to history.replace, yet NewEntryCategory IonPage remains.