Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48977

How to clear leftover IonPage from DOM?

$
0
0

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:

  1. Visit EntryList page, that lists entries
  2. Navigate to NewEntryCategory page using history.push
  3. NewEntryCategory contains buttons that navigate to NewEntryName page using history.push
  4. Within NewEntryName page it is possible to get back to EntryList page with a button that uses history.replace
  5. 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.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>