0👍
When you are passing initialNote
as prop for initial value, but I see initialNote
is being populated asynchronously in getNote
method, so it will not be present initially when the component will be mounted. It will be populated after some time by the time initialisation would have already happened.
In the example give in vue documentation, initialCounter
is static value which will perfect as it will have same value from beginning.
Source:stackexchange.com