If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).
Example below explains implications for different implementations.
| <?php | |
| echo "This message will self-destruct in ..\n"; | |
| foreach (range(3, 1, -1) as $num) { | |
| echo "$num...\n"; | |
| sleep(1); | |
| } | |
| unlink(__FILE__); | |
| echo "💨 Poof!\n"; |