#12228·Vue.js

TypeError: Cannot read properties of null (reading 'setupContext') at getContext at useAttrs

Author: eeee-creatorCreated Oct 21, 2024Updated Aug 11, 2026
Labels🔩 p2-edge-case
### Vue version 3.5 ### Link to minimal reproduction https://stackblitz.com/edit/vitejs-vite-qzosvt?file=src%2Fcomponents%2FButton.vue ### Steps to reproduce Fragment.vue component, if displayed no root component will appear. ``` ``` Button.vue component, depending on a prop i want to show the Fragment.vue (empty root) or a div ``` {{ label }} ``` App.vue, the "changeProp" button will change the label prop of the Button.vue, the error will popup. ``` changeProp
{{ label }}
``` ### What is expected? The label const is expected to change without an error. ### What is actually happening? TypeError: Cannot read properties of null (reading 'setupContext') at getContext (vue.js?v=59154800:5362:12) at useAttrs (vue.js?v=59154800:5355:10) ### System Info ```shell System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: vue: ^3.5.0 => 3.5.12 ``` ### Any additional comments? In Vue 3.4, no error occurred, but in Vue 3.5, it does.