how to update a list in react js