Saltar al contenido principal
0

Por ahora, esta lección está en inglés.

Write the logic once

The status bar and the send button both need to know whether the user is online, with the same state and the same effect. Copy and paste works until one copy gets a fix and the other does not. Custom hooks let you write that logic once.