我从react开始尝试一些东西。但我不断地得到错误的"Uncaught TypeError: (0 , _reactRedux.combineReducers) is not a function“这是我的演示配置文件
import React from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware,compose } from 'redux'
import { Provider } from 'react-redu
我是新的反应和还原,我已经创建了一个小型电子商务应用程序。但是,在实现redux之前,一切都很正常,在实现之后,我得到了“无法读取未定义的属性‘映射’”。所以,我在下面分享我的代码
index.js
import React from "react";
import ReactDOM from "react-dom";
import Main from "./Main";
import "./index.css";
import 'bootstrap/dist/css/bootstrap.css';
import
我想知道为什么单击表行仍然会给出未定义的调度错误,从而导致Uncaught TypeError: dispatch is not a function。我一直在遵循这个来尝试解决这个问题,但到目前为止还没有成功。
ListingTable.js
import Table from 'grommet/components/Table';
import React from 'react';
import {remove, add} from '../action/ListAction';
import {connect} from 'rea
我一直在尝试用我的react redux项目来实现redux-persist。这就是我所拥有的。
store.js:
import {compose, createStore, applyMiddleware} from 'redux';
import {persistStore, autoRehydrate} from 'redux-persist';
import {combineReducers} from 'redux';
import thunk from 'redux-thunk';
import reducer f
我在学习反应和克制。尝试从服务器获取数据并在页面上呈现数据。但会犯错误。我做错了什么?
index.js
import 'babel-polyfill';
import React from 'react';
import ReactDOM from "react-dom";
import {Provider} from 'react-redux';
import {createStore} from "redux";
import {applyMiddleware} from 'redux'
我有一个React应用程序,它希望添加Azure登录身份验证。
在没有Azure AD的index.js中调用App.js的原始代码如下:
import React from 'react';
import ReactDOM from 'react-dom';
import 'index.css';
import App from 'App';
import * as serviceWorker from 'serviceWorker';
import { createStore } from 'redux
在测试期间,我会抛出一个异常:
Expected the reducer to be a function.
但这毫无意义。reducer的类型肯定是一个function。但是,输出也发生了一些奇怪的事情:
PASS src/App.test.js
● Console
console.log src/reducers.js:8
--- searchResultsReducer: function
console.log src/store.js:12
--- 6666: createStore, rootReducer: function
我正在开发一个与Redux交互的应用程序,当什么都没有呈现并且没有出现错误时,这是令人沮丧的。在这种情况下,有人能提供一些故障排除实践吗?
我看到了一个类似的帖子:
我试着在那里实现这些建议,但这对我没有任何帮助,我只是继续从浏览器中得到一个空白的凝视。
这是我的还原机/减速机_books.js:
// Step 1. Developing Our Reducer.
// Step 2. In index.js we will wire it in so that it will work
// this is a reducer, just a function and a return w
我正在尝试在我的反应项目中实现redux-坚持。Redux运行良好,但是当我实现redux持久化时,我开始得到以下错误:
Types of property 'dispatch' are incompatible.
Type 'Dispatch<{ type: string; payload: any; }>' is not assignable to type 'Dispatch<AnyAction>'.
Type 'AnyAction' is not assignable
我目前正在使用react开发一个应用程序,这是我第一次使用react,但是我很难添加redux。我得到了这个错误TypeError: Cannot read property 'getState' of undefined,我不知道如何修复它。这是我的代码:
import React from "react";
import Home from "./home";
import { store } from "./redux/store";
import { Provider } from "react-redux
我正在运行一个react-app,并使用react-redux来管理我的状态。它一开始工作得很好,但是突然崩溃了。我不能捕获任何对象,只是告诉我“createStore longer.It :TypeError(...) is not a function” 我试着按照别人说的那样重新安装一个低版本的react-redux,但是它不起作用。我清除了cookie,重新启动了项目,但什么都没有改变。我只是尝试将代码作为redux offical size提供的示例,它在调用createStore(reducer)的第一步中很糟糕。 依赖项版本: "react": "^16