Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks not re-added after v-if optimization in options API #12020

Closed
solesonicsteph opened this issue Sep 24, 2024 · 4 comments
Closed

Hooks not re-added after v-if optimization in options API #12020

solesonicsteph opened this issue Sep 24, 2024 · 4 comments
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. regression scope: reactivity

Comments

@solesonicsteph
Copy link

solesonicsteph commented Sep 24, 2024

Vue version

3.5.7

Link to minimal reproduction

https://play.vuejs.org/#eNp9VE1v2zAM/SuELmmBJim2njInwzZ0QHbYhq23aQfVphO1smRIdJog8H8f5a84Qdf4EOmR1Hv8kI7iU1nOdhWKhUhC6nVJK2n5I9yXzhNkmKvKEBwjJsmqAhcgxQMGkuKmBVNXlM6ipbCAY92BmSJ1dd3HSfJIlbenfQyzmSbtrDLrrwvIlQnYBccv12iyyDXwSKo/tKueBAsdSf/8HSmpCDls4DFoN7Rdh9uxmEEObXWYNUyz1hGWyyXcdjQnov4/9aj4/NNZvUGFg02hcJU9M0tqGM5ShSWQr3DgaDw2SF9YvLKHtc3d1fVFogXS1mWxvn3UZUC0QPcLSA+6QFfRFRuWq3HiHV+TMyuRQkFsKlj3wqW+dLsU3jSJtfVM9Q28u369WLFXyXw0Uwm3qzRcvrijJNM7SI0KYSlFMb2TooE7w26qc8bP6Nkj1z4QPBqXPsOL5m5ZBx5z9GhTBHLQDwCU3pXJnI86PxVZfocwpi07M1q4DA3TNUWRAuaDy/EIwwBBXQ+RY/GPFZGzHLbokVPIR5hkOqhHw5LSygfnp9bRVBnjXjCbwAImE85LMbhFH8fRbs5kD+t+lczHZbRJoINBCKkrMVtxveN2JW4EMWRzvZk9BWf5djfjEStalNqg/1HGsgYpmpGKreRJiKq+NVgcUO5ii6dbTJ9fwZ/CPmJS/PQY0O+wuamtjZTnCW3N97+/4759Lloj17sy7P2G8RcGZ6qosXX7XNmMZY/8GrVrfnk8cdEewv2e0IY+qSg0esZZjN78xMXr8r/UT3Lfz+6aOGlrUf8D14/M9Q==

Steps to reproduce

Open the link, look at the output. lengthIs0 is showing true

What is expected?

lengthIs0 should have been recomputed after the setTimeout - however, it appears after initial optimization related to the v-if statement, the hook is not being added back on conditional change.

This worked in 3.4 - and works in composition api, however, is not working for options in 3.5.7 (or 8)

What is actually happening?

Computed, is not, in fact, computed.

System Info

No response

Any additional comments?

I upgraded from 3.4 ==> 3.5.7 and a unit test broke, upon investigation, this is where I landed.

@davidagitlen
Copy link

+1, I've also experienced this same issue.

@edison1105
Copy link
Member

It works in v3.5.6

@edison1105 edison1105 added ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. regression labels Sep 24, 2024
@JimmyPez
Copy link

+1. I've also experienced the same.

@danjchoi
Copy link

Thanks for the fast fix and release! I was also running into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. regression scope: reactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants