Skip to content
Permalink
|
import AddTodoForm from '../components/AddTodoForm' |
|
|
|
import { connect } from 'react-redux' |
|
import { addTodo } from '../actions' |
|
|
|
|
|
const mapDispatchToProps = (dispatch) => { |
|
return { |
|
onSubmit: (text) => { |
|
dispatch(addTodo(text)) |
|
} |
|
} |
|
} |
|
|
|
let AddTodo = connect(null, mapDispatchToProps)(AddTodoForm) |
|
|
|
export default AddTodo |
Something went wrong with that request. Please try again.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.