NeoSOFT interview question

How to update a simple object in React