Understanding how this.$forceUpdate()
functions, I am not simply looking to re-render the component.
In Nuxt applications, page components have asyncData()
as a lifecycle method that runs before created()
. I utilize this method to retrieve initial data and implement server-side rendering (SSR).
The reason for wanting to reload the component is to fetch the data again after modifying relevant data within the component using AJAX. Despite attempting this.$forceUpdate()
and
this.$router.replace(this.$route.path)
, neither approach was successful. Avoiding the use of location.reload()
due to the requirement of displaying a toast message post-modification.
Would there be an alternative solution to achieve this task? Or perhaps should I transition my fetching logic to the fetch()
method and invoke this.$fetch()
?