PUT and POST using React