redux-webpack-es6-boilerplate
Version:
A starter project for modern React apps with Redux
25 lines (20 loc) • 647 B
JavaScript
import React, { Component, PropTypes } from 'react';
import AddFriendInput from './AddFriendInput';
import FriendList from './FriendList';
import './FriendListApp.scss';
export default class FriendsLayout extends Component {
static propTypes = {
actions: PropTypes.object.isRequired,
friends: PropTypes.object.isRequired
};
render() {
const { friends: { friendsById }, actions } = this.props;
return (
<div className="friendListApp">
<h1>Best Rappers List</h1>
<AddFriendInput addFriend={actions.addFriend} />
<FriendList friends={friendsById} actions={actions} />
</div>
);
}
}