Hello, as we are building a large application, it is at times strongly preferred to completely remove and replace pages, instead of reusing them, having to reset all their state manually.
I have so far found ways to reuse all pages on push and goBack, and ways to replace all pages on push and goBack. What I have not found is a way to gain more control over when each of these happen. What I would like is to always get a new page on router.push, but always reuse the previous page on router.goBack.
How would I go about achieving this? Alternatively, how would I go about removing one or many/all pages, from JavaScript?