{"size": 411, "ext": "js", "max_stars_repo_path": "react/with-redux/src/components/TextArea.js", "max_stars_repo_name": "JDBERBEO/TOP", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "react/with-redux/src/components/TextArea.js", "max_issues_repo_name": "JDBERBEO/TOP", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "react/with-redux/src/components/TextArea.js", "max_forks_repo_name": "JDBERBEO/TOP", "max_forks_repo_forks_event_min_datetime": "2021-05-27T22:42:44.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-01T04:16:44.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 18.6818181818, "max_line_length": 58, "alphanum_fraction": 0.6253041363}
import { useSelector, useDispatch } from 'react-redux'
import { changeText } from '../store/textReducer'

function TextArea() {
  const dispatch = useDispatch()

  const { text } = useSelector(({ textReducer }) => {
    return {
      text: textReducer.text
    }
  })

  return (
    <textarea
      onChange={e => dispatch(changeText(e.target.value))}
      value={text}
    />
  )
}

export default TextArea
