Last active
April 2, 2025 08:35
-
-
Save techbysalma/37788d0d3d7434fab4910e165bcaf0f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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