question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vue 3 props aren't reactive

See original GitHub issue

Using version 3.0.0-1 of this library.

<font-awesome-icon :icon="computedFunc"/>

When computedFunc return value changes the icon doesn’t change. This code worked with Vue 2.6.11 & the 0.1.9 release of this library.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:9
  • Comments:5

github_iconTop GitHub Comments

19reactions
Gobdcommented, Sep 2, 2020

Here’s a repo with vue2 & vue3 folders as examples. Both were created with @vue/cli 4.5.4.

https://github.com/Gobd/fa3-bug

This can be fixed for now by adding a :key="" right next to the :icon prop with the same value as the icon prop.

2reactions
ArcherGucommented, Jan 12, 2021

I’m having the same problem, although I can add :key="" now to solve it,will there be a more elegant way in the future?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Props gotten directly from vue 3 setup are not reactive
Vue 3 uses Proxy to achieve reactivity. The idea is that for the given raw data object: { courseId: "something" } , Vue...
Read more >
Vue3 composition api - props reactive
In composition API you can pass properties data like images array parent Element to child element and also props are reactive in it....
Read more >
How To Use Props in Vue.js - Upmostly
Props are also reactive: when the parent component updates a prop, it will automatically update on the child component as well. This can...
Read more >
Vue: Making props passed from parent > child reactive after ...
Posted 3 years ago ... Vue: Making props passed from parent > child reactive after mounted() is called. I have a parent that...
Read more >
Props gotten directly from vue 3 setup are not reactive-Vue.js
Vue 3 uses Proxy to achieve reactivity. The idea is that for the given raw data object: { courseId: "something" } , Vue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found