When react first renders the component it per your code takes the addresses prop and creates a state currentAddress. So the process to update React …