我是比较新的反应和webpack,我刚刚开始了一个新的项目来工作。要配置DevTool,我们有:
export function renderDevTools(store) {
if (__DEV__) {
let {DevTools, DebugPanel, LogMonitor} = require('redux-devtools/lib/react');
return (
<DebugPanel top right bottom>
<DevTools store={s
所以redux thunk给了我这个错误(或者不是redux-thunk而是扩展)。
The previous state received by the reducer has unexpected type of "Function".
Expected argument to be an object with the following keys: "register"
商店
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux
我将redux-devtools与redux-devtools-dock-monitor和redux-devtools-log-monitor一起使用。
我遵循了文档。但是,在控制台中,我收到以下错误:
index.js:1452 Redux DevTools could not render.
You must pass the Redux store to <DevTools> either as a "store" prop
or by wrapping it in a <Provider store={store}>.
下面是我的Root组件
我尝试了一下redux,遇到了一个问题,我找到了解决方案(这里:React Redux - Error passing several store enhancers to createStore()),但这不是我想要的解决方案。基本上,我和问问题的人基本上有相同的问题,当我们创建redux商店时,我们这样做: import { createStore, applyMiddleware } from "redux";
import { composeWithDevTools } from "redux-devtools-extension";
import r
我今天刚升级到Webpack 2.2,一直在阅读他们的指南,这似乎还在进行中。
我很难设置我的应用程序使用webpack开发服务器与热模块重新加载.
我通过webpack文档所遵循的指南就在这里,但是我必须修改它才能使用开发/生产应用程序。
我得到的两个错误如下..。
Uncaught Error: _registerComponent(...): Target container is not a DOM element.
at invariant (eval at <anonymous> (index.js:2), <anonymous>:44:15)
我有下面的代码,我的redux商店和一切正常工作时,与预期的有线反应。现在,我试图在动作分派器中访问存储的当前状态(除了react之外),但是当我在初始分派之后使用它时,我得到的是空值。
import configureStore from '../../common/store/configureStore';
const history = createHistory();
const reduxRouterMiddleware = syncHistory(history);
// Create a new Redux store instance
const store
我遵循Redux教程创建Todo应用程序,我尝试应用并尝试将它与React Router一起嵌入到我的Provider中,但是我得到了这个错误:
Warning: Failed prop type: Invalid prop `children` of type `array` supplied to `Provider`, expected a single ReactElement.
in Provider (created by Root)
in Root
下面是我试图嵌入它的方法:
import { createStore } from 'redux'
如何使用redux触发actionCreator以获取初始数据。当应用程序加载时,我需要一个地方来获取我的初始数据。
我把它放在这里,但actionNoteGetLatest还不是一个道具。你能帮帮我吗。
componentDidMount() {
// This is where the API would go to get the first data.
// Get the notedata.
this.props.actionNoteGetLatest();
}
import React, { Component } from 'r