Whenever there is a change in our page, the application is 'updated' and the 'beforeUpdate' hook happens just before that.
It is safe to modify our page in the 'beforeUpdate' hook like we do here, but if we modify our page in the 'updated' hook, we will generate an infinite loop.
This is the component