React – Quick solution to update the parent component when the child’s state has changed

The following answer was a quick and good solution for updating the parent component when the child’s state has changed:

Credits:

  • http://stackoverflow.com/questions/35537229/how-to-update-parents-state-in-react
  • http://stackoverflow.com/users/3103108/woolywhale