我是React Native的新手。我试图在Windows 10上的模拟器中打开现有的React Native项目,但它会抛出此错误:
undefined is not a function (evaluating '(0, _reactRedux.combineReducers)')
我使用的是0.45.1版本的React Native。为什么会这样?
答案 0 :(得分:1)
combineReducers
是由redux
导出的实用程序函数,而不是react-redux
。它不是特定于React的,它是一个实用函数,所以它来自redux
包。您正尝试从react-redux
导入它,因此它未定义,因为它不存在,并且当您尝试执行该函数时,它会抛出错误。从redux
:
import { combineReducers } from 'redux';