Skip to content

Snippet #38 Custom Hooks no React: fundamentos que ainda importam

October 22, 2026 · 15 min

Show notes

Seu componente React acumula useState e useEffect que se repetem em outras telas? Neste Snippet, recebemos Lucas Vilas Boas, Arquiteto de Soluções na dti digital. Ele retoma fundamentos como KISS e DRY para mostrar quando faz sentido extrair lógica para um Custom Hook. Ele também apresenta o critério que separa um hook de uma função comum e constrói dois exemplos no código, de um contador a um campo de busca com debounce. Dê o play e assista agora!

Assuntos abordados:

  • KISS e DRY;
  • Hooks no React;
  • Classes x functions;
  • Quando criar hooks;
  • Overhead de hooks;
  • Hook useCounter;
  • Hook useDebounceValue;
  • Testes de hooks.

Links importantes:

Contato: [email protected]

O Entre Chaves é uma iniciativa da dti digital, uma empresa WPP

#programacao


All episodes of Entre Chaves

Settings

Display

Language

Decides which stations you see first on the home page.

History

Recently played stations and episodes and your latest searches are only stored in this browser.

Notifications

A short notice when a podcast you follow has a new episode. Turn off single podcasts with the bell on their page.

Account

Save favorites – in the app and on the website.

Keyboard shortcuts

/
Open search
Space
Play or pause
← →
In the player: back 15 s, forward 30 s (episodes) · in a row: next tile
↑ ↓
In a row: target within the tile
Home / End
In a row: first or last tile
Esc
Close window or menu
?
This overview
Now playing

Go to station page

Play next

    Add episodes with “Play next” – they play after the current episode.