upating react component