core
core copied to clipboard
fix(templateRef): prevent unnecessary set ref on dynamic ref change or component unmount
close #12639
Summary by CodeRabbit
-
Bug Fixes
- Improved handling of template refs to ensure they are properly cleared when a child component is unmounted and updated in the same tick, preventing stale or conflicting ref updates.
-
Tests
- Added new tests to verify correct behavior of template refs during rapid updates and unmounts, including ref name changes within the same tick.