From the Vue.js documentation, the $nextTick is explained as:
Defer the callback to be executed after the next DOM update cycle. Use it immediately after you’ve changed some data to wait for the DOM update.
Great! So the second statement says to use it immediately after some data has changed and I know setTimeout with 0 is also called immediately. I created this little sandbox to understand the two but still, I don't seem to get the difference between the two approaches?
Any explanation on their difference will be much appreciated.