Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ENTREGANDO UMA EXPERIÊNCIA MELHOR COM SWR
Search
Tailo Mateus Gonsalves
January 22, 2021
Programming
0
110
ENTREGANDO UMA EXPERIÊNCIA MELHOR COM SWR
Tailo Mateus Gonsalves
January 22, 2021
Tweet
Share
More Decks by Tailo Mateus Gonsalves
See All by Tailo Mateus Gonsalves
BATE PAPO SOBRE A VIDA, A CARREIRA E TUDO MAIS!
tailomateus
0
17
React components - Melhores práticas
tailomateus
0
22
Chapter Lead
tailomateus
0
32
Arquitetura_Front-end.pdf
tailomateus
0
120
Other Decks in Programming
See All in Programming
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
240
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
120
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
690
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.7k
tparseでgo testの出力を見やすくする
utgwkk
2
220
チームをチームにするEM
hitode909
0
330
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
150
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
410
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
140
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
YesSQL, Process and Tooling at Scale
rocio
174
15k
[SF Ruby Conf 2025] Rails X
palkan
0
520
Designing Experiences People Love
moore
143
24k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
100
Raft: Consensus for Rubyists
vanstee
141
7.2k
Statistics for Hackers
jakevdp
799
230k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Transcript
Apresentação de Tailo Mateus Gonsalves ENTREGANDO UMA EXPERIÊNCIA MELHOR COM
SWR
Usa dados antigos enquanto avalia se tem novos dados
• Back-end agnostic • Fast page navigation • Revalidation on
focus • Smart error retry • React Suspense • SSR/React Native support
Mensagem de carregamento enquanto busca dados do servidor Mostrar os
dados em cache enquanto recupera novos dados da API Problema Solução
None
1. Construído com React Suspense 2. Permite buscar dados
const Page = React.lazy(() => import('./Page')); <Suspense fallback={<Spinner />}> <Page
/> </Suspense>
1. Construído com React Suspense 2. Permite buscar dados
import useSWR from 'swr' export function useFetch(url) { const {
data, error } = useSWR(url, async url => { const response = await api.get(url) return response.data; }) return { data, error } }
None
1 - Renderizado no servidor; 2 - Equipado com SWR.
Dados atualizados ao longo do tempo e das interações do usuário.
const Page = () => { const { data }
= useSWR<any>('/training', fetcher); return ( <Suspense fallback={<div>loading...</div>}> <Profile/> </Suspense> ) }
None