0👍
if i understand your question correctly you should tie a :key value pair to the component you want to refresh. so essentially when whatever happens in the example function it will increment the change variable which is tied to the component and forces it to refresh.
example –
<template>
<div>
<div @click="example()"> <p>update</p> </div>
<Component :key="change" />
</div>
</template>
<script>
import { ref } from "vue";
export default {
components: {
Component,
},
setup() {
var change = ref(0);
function example() {
change.value += 1;
}
return {
change,
example,
};
},
};
</script>
- [Vuejs]-Flask handle request but get none
- [Vuejs]-Npm run serve on vue cli app generated this error, "ERROR Error: .presets[0] must be a string, object, function"
Source:stackexchange.com