0
ナビゲーションバーとログインプロファイルセクションを含むマスターページを作成します。 Login-Profileセクションでreduxを接続して、レデューサーからデータを取得します。どのように私はアプリでそれを行うことができますか?また、ストアパラメータを持つプロバイダを作成しているので、そのコンテナを作成できますか?マスターページやそのアイテムはどこに置くべきですか?Reduxに接続するReact-Router-ReduxでMasterPageを作成するにはどうすればよいですか?
注:メインページ、マスターページではありません!混乱させて申し訳ありません
import React, { Component } from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import { Provider } from 'react-redux';
import { configureStore } from '../resources/redux/store';
import MainPage from './mainPage';
import Profile from './profile';
import Stream from './stream';
import Market from './store';
const store = configureStore();
export class App extends Component {
render() {
return (
<Provider store={store}>
<BrowserRouter>
<Switch>
<Route exact path='/' component={MainPage} />
<Route path='/profile' component={Profile} />
<Route path='/stream' component={Stream} />
<Route path='/store' component={Market} />
</Switch>
</BrowserRouter>
</Provider>
);
}
};