I have route /devices where I have device1 and device2 . Clicking on device1 sends me to /devices/device1 ( history.push('/device1') ), same with device2 . I have a logo that sends me to /devices (history.push).
If I go to device1 > logo > device2 > logo > device1 > logo > device2 and i delete device2 and do history.replace('/devices'), than on back button i can not go to url /devices/device2 because I have replaced it, but if I go couple more back button clicks I am on the /devices/device2 url because it is still in history.
How can I remove completely /devices/device2 from the history? I hope someone understands the question.
Thanks