Reactive object setting. Should this be necessary? #255
Unanswered
BigBlueHat
asked this question in
Q&A
Replies: 1 comment
-
|
I've checked StackOverflow and read through #43 #234 which informed the ultimate shape of what's above, fwiw. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've built a JSON renderer (of sorts) using petite-vue, but when I started refactoring it to use nested components the reactivity broke. I first removed object deconstruction from the components. I next tried dynamically updating the object key by key. I then found what was actually needed was to incorporate
$nextTickbecause the data was successfully being updated and still within the Proxy, but the DOM updates just weren't populating without waiting.The
setData()method feels like it should be core (somehow) to a petite-vue project. It seems unavoidable if/when one doesn't know the shape of the JSON object being updated and therefore cannot update it a key at a time. But I'm very likely missing something obvious...Beta Was this translation helpful? Give feedback.
All reactions