nuxt / devtools

Unleash Nuxt Developer Experience
https://devtools.nuxt.com
MIT License
2.87k stars 160 forks source link

fix: reactivity of useState is not populated properly #643

Open kleinpetr opened 6 months ago

kleinpetr commented 6 months ago

🐛 The bug

When I change the value in the useState, inside a compsable, the new value is not populated proeprly.

Reproduction process

  1. open devtools -> payload and see test-my-test
  2. click Update button
  3. reload value in the devtools (it's still empty)

🛠ī¸ To reproduce

https://stackblitz.com/~/github.com/kleinpetr/nuxt-playground/tree/devtools-usestate-reactivity

🌈 Expected behavior

I would expect the property is being updated.

ℹī¸ Additional context

When you reload the page with closed devtools, then hit the Update button and then open them, the value is there and when you click for example to Add string and reload the value, it works correctly but once you hit the Update button again and then reload value in devtools it's stucked.