Answer the question
In order to leave comments, you need to log in
How to make page scripts stop working when switching to another route?
I have a setTimeout that gives a console log giving the name of the route, and if I switch between two pages, the console logs are constantly added, and the old ones remain. Is there any way to get rid of all scripts. Those. not only setTimeout, which can be simply stopped, but also imports. Those. so that it is like on a regular page (when you enter, and only what is connected on the page itself works there)
Or can you make it so that the scripts are loaded only during initialization?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question