update data on a page without refreshing react