Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // list of articles
- import ArticleList from '../ArticleList';
- import React from 'react';
- import { connect } from 'react-redux';
- // extract articles from state
- const mapStateToProps = state => ({
- articles: state.articles
- });
- const MainView = props => {
- return (
- // render a tab saying 'Global Feed'
- <div className="col-md-9">
- <div className="feed-toggle">
- <ul className="nav nav-pills outline-active">
- <li className="nav-item">
- <a
- href=""
- className="nav-link active">
- Global Feed
- </a>
- </li>
- </ul>
- </div>
- {/* render list of articles */}
- <ArticleList
- articles={props.articles}
- />
- </div>
- );
- };
- export default connect(mapStateToProps, () => ({}))(MainView);
Advertisement
Add Comment
Please, Sign In to add comment