git ssb

1+

dinoworm ๐Ÿ› / catstack



Tree: 9642105bd047078b96b5d68874a78e1c620077e2

Files: 9642105bd047078b96b5d68874a78e1c620077e2 / app / todos / containers / index.js

624 bytesRaw
1import React from 'react'
2import { connect } from 'react-redux'
3import { map } from 'lodash'
4
5import actions from '../actions'
6import TodoList from '../components/todo-list'
7import Todo from '../components/todo'
8
9class TodosContainer extends React.Component {
10 static fetchData = (getState, dispatch, location, params) => {
11 return dispatch(actions.find())
12 }
13
14 render () {
15 return <TodoList>
16 {
17 map(this.props.todos, todo => {
18 return <Todo todo={todo} />
19 })
20 }
21 </TodoList>
22 }
23}
24
25export default connect(
26 (state) => ({
27 todos: state.todos.records
28 })
29)(TodosContainer)
30

Built with git-ssb-web