Skip to content

Instantly share code, notes, and snippets.

@techbysalma
Last active April 2, 2025 08:35
Show Gist options
  • Select an option

  • Save techbysalma/37788d0d3d7434fab4910e165bcaf0f3 to your computer and use it in GitHub Desktop.

Select an option

Save techbysalma/37788d0d3d7434fab4910e165bcaf0f3 to your computer and use it in GitHub Desktop.
<template>
<render-component :key="count" />
<span @click="renderComponent">Click to reload render-component</span>
</template>
<script>
import { ref } from 'vue'
export default {
name: 're-render',
setup() {
const count = ref(0)
const renderComponent = () => {
count.value++
}
return {
count,
renderComponent
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment