0
私はReduxのに新たなんだので、これは私のアプリ内で起こって取得しようとしている - 私は、次のエラーを取得しています:Reduxセットアップ| ReactJS | ES6
Uncaught TypeError: (0 , _index2.default) is not a function
はそこReduxの設定を取得する方法について文書全体のヒープはありません。私はこのサイトを知っている:http://redux.js.org/しかし、これはあまり役に立ちませんでした。
私は行方不明をよく知りませんか?ここで
は、私のファイルは、以下のとおりです。
Client.js Reducers/index.js
以内
//Client entry
//Application modules
import React from "react";
import { Provider } from "react-redux";
import ReactDOM from "react-dom";
import { Router, Route, IndexRoute, hashHistory } from "react-router";
import { createStore } from "redux";
import reducers from "./reducers/index";
//Application views
import Layout from "./components/Layout";
import ForgotPassword from "./containers/ForgotPassword/ForgotPassword";
import Login from "./containers/Login/Login";
import Register from "./containers/Register/Register";
const store = createStore(reducers());
const app = document.getElementById('app');
ReactDOM.render(
<Provider store={store}>
<Router history={hashHistory}>
<Route path="/" component={Layout} />
<Route path="/login" component={Login} />
<Route path="/register" component={Register} />
<Route path="/forgotpassword" component={ForgotPassword} />
</Router>
</Provider>,
app);
export default store;
Layout.js
import React, {Component} from "react";
import Footer from "./Footer/Footer";
import Header from "./Header/Header";
import Login from "../containers/Login/Login";
import Register from "../containers/Register/Register";
import ForgotPassword from "../containers/ForgotPassword/ForgotPassword";
export default class Layout extends Component {
constructor() {
super();
}
render() {
return (
<div>
<Header />
<Login />
<Register />
<ForgotPassword />
<Footer />
</div>
);
}
}
レデューサー/ index.js
import { createStore, combineReducers } from "redux";
import { reducer as formReducer } from "redux-form";
const reducers = {
form: formReducer
}
const reducer = combineReducers(reducers);
const store = createStore(reducer);
export default reducers;
なぜ 'createStore'が2回あるのですか?なぜ、「輸出者の減税措置」はないのですか? – conor909