Everything that is happening inside a hook “belongs” to the component that uses it. The same rules regarding Context and State changes apply here:

State change inside the hook will trigger an unpreventable re-rerender of the “host” component

If the hook uses Context and Context’s value changes, it will trigger an unpreventable re-rerender of the “host” component

Hooks can be chained. Every single hook inside the chain still “belongs” to the “host” component, and the same rules apply to any of them.

Click on the button and look at console.log

Hook rerender
Link to Code