gpt4 book ai didi

android - 未定义不是 React Native 项目中的函数

转载 作者:行者123 更新时间:2023-11-29 01:08:46 26 4
gpt4 key购买 nike

我是 React Native 的新手。我试图在 Windows 10 的模拟器中打开现有的 React Native 项目,但它抛出了这个错误:

undefined is not a function (evaluating '(0, _reactRedux.combineReducers)')

我使用的是 0.45.1 版本的 React Native。为什么会这样?

enter image description here

最佳答案

combineReducersredux 导出的实用函数,而不是 react-redux。它不是特定于 React 的,而是一个实用函数,因此它来自 redux 包。您正在尝试从 react-redux 导入它,所以它是未定义的,因为它不存在,当您尝试执行该函数时,它会抛出错误。从 redux 导入它:

import { combineReducers } from 'redux';

关于android - 未定义不是 React Native 项目中的函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44915468/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com