Error in render: "TypeError: Cannot read properties of undefined (reading 'state')" found in
时间: 2023-08-28 08:17:12 浏览: 159
回答: 这个错误通常是由于在渲染过程中尝试读取未定义的属性引起的。根据你提供的引用内容,你遇到的问题可能是在Vue组件的渲染过程中,尝试访问了一个未定义的属性'state'。该错误可能发生在你调用的子组件中。与此类似,另一个用户在使用Vuex时也遇到了类似的问题。他们的项目中使用了Vue 2,但引入了VueX 4.0版本,导致了类似的错误。通过切换到VueX 3.0版本解决了问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Vue 报错Error in render “TypeError Cannot read properties of null (reading ‘xxx’)” found in](https://blog.csdn.net/m0_67401134/article/details/123266638)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [[Vue warn]: Error in render: “TypeError: Cannot read properties of undefined (reading ‘state‘)...](https://blog.csdn.net/sum_HX/article/details/126646888)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文