usestate with redux connect code example
Example 1: react hooks redux
import React from 'react'
import { useSelector } from 'react-redux'
export const TodoListItem = props => {
const todo = useSelector(state => state.todos[props.id])
return <div>{todo.text}</div>
}
Example 2: useDispatch()
useDispatch({ type: '', playload });