Skip to content

Commit

Permalink
Watch props properly
Browse files Browse the repository at this point in the history
Fix #3
  • Loading branch information
DannyFeliz committed Mar 29, 2024
1 parent a7c8147 commit add8b84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vue-tweet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
type PropType,
nextTick,
watch,
toRef,
} from "vue";
const langs = [
Expand Down Expand Up @@ -198,8 +199,8 @@ onMounted(() => {
renderTweet();
});
watch(props, () => {
renderTweet();
watch(toRef(props), renderTweet, {
deep: true,
});
function renderTweet(): void {
Expand Down

0 comments on commit add8b84

Please sign in to comment.