Closed
Description
Note: Here I'm all talking about a prop that doesn't exist in data
in the first place.
The api says:
If the object is reactive, ensure the property is created as a reactive property and trigger view updates.
At least for me, it's not clear "does set
work if the prop isn't in data
, and I've already added it diredtly without set
?". So I tried the source code and the comment made it clear:
Adds the new property and triggers change notification if the property doesn't already exist.
Then I altered my code to use set
at prop addition and the not-properly-re-rendering problem was fixed.
So I think it may be better to explicitly tell in the api that set
only works when the prop doesn't exist yet? Like the comment does?
Metadata
Metadata
Assignees
Labels
No labels