Force update component or DOM element in Vue


The keyword here is key
Update the component that you want to force update with an unique key whenever the update is triggered.

If you want to refresh the whole route page, give your route an unique key <router-view :key="$route.params.unique-id"></router-view>

Leave a Reply

Your email address will not be published. Required fields are marked *