When JSX is used, v-slots cause child component does unnecessary rendering during parent component re-rendering #712
Open
Description
Vue version
3.4.21
Link to minimal reproduction
https://github.com/yuwu9145/vue-jsx-slot-demo
Steps to reproduce
- Load and run the project
- Type something in the input to trigger parent App component render function
- Check console logs
- Then go to src/App.tsx and comment out line 20
- Type something again
- Check console logs again, see the different results
What is expected?
Only parent App component's onUpdated
hook should be triggered, child Test component should not be re-rendered as nothing is changed to trigger child Test render function
What is actually happening?
Both parent App and child Test components are re-rendered
System Info
System:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M1 Pro
Memory: 114.45 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
Yarn: 1.19.0 - ~/.nvm/versions/node/v18.19.0/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
Browsers:
Chrome: 125.0.6422.141
Firefox: 124.0.2
Safari: 17.2.1
npmPackages:
vue: ^3.4.27 => 3.4.21
Any additional comments?
No response
Metadata
Assignees
Labels
No labels