Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from "react"
  2. import { connect } from 'react-redux'
  3. import TodoForm from '../todo/todoForm'
  4. import { bindActionCreators } from 'redux'
  5. import { changeDescription, search, add, clear } from '../todo/todoActions'
  6.  
  7. const mapStateToProps = state => ({
  8.     description: state.todo.description
  9. })
  10.  
  11. const mapDispatchToProps = dispatch => bindActionCreators({
  12.     handleChange: changeDescription,
  13.     search,
  14.     add,
  15.     clear
  16. }, dispatch)
  17.  
  18. export default connect(mapStateToProps, mapDispatchToProps)(TodoForm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement