1

I have two routes /questions and /profile. In the onDestroy() lifecycle event I called console.log('destroyed'). When I switch between routes I get 'destroyed' in Chrome console each time.

The problem is that inside /questions route, I have checkboxes, binded using bind:group={multiple_ids}. So after checking/unchecking a field, when I switch from /question to /profile route. Contents of /question route are showing inside /profile route and Chrome console is not showing 'destroyed' anymore after this! This behavior seems very strange to me. I have no idea what is happening. This is a working project. Please solve this. Thanks

1 Answer 1

1

Do you have transitions in your components? According to this bug-report, elements can show up in other routes after navigation. It sounds a lot like the issue you're having.

A solution would be to use the |local modifier for your transition attributes. Have a look at the API docs on how to apply it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.