Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
16
React components - Melhores práticas
tailomateus
0
20
Chapter Lead
tailomateus
0
31
Arquitetura_Front-end.pdf
tailomateus
0
110
Other Decks in Programming
See All in Programming
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
720
CSC509 Lecture 08
javiergs
PRO
0
270
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
330
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
240
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
4
17k
CSC305 Lecture 11
javiergs
PRO
0
320
Software Architecture
hschwentner
6
2.4k
CSC509 Lecture 09
javiergs
PRO
0
280
iOSでSVG画像を扱う
kishikawakatsumi
0
180
Claude Agent SDK を使ってみよう
hyshu
0
1.5k
data-viz-talk-cz-2025
lcolladotor
0
110
CSC305 Lecture 13
javiergs
PRO
0
340
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
329
39k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Embracing the Ebb and Flow
colly
88
4.9k
Agile that works and the tools we love
rasmusluckow
331
21k
Testing 201, or: Great Expectations
jmmastey
46
7.7k
Unsuck your backbone
ammeep
671
58k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Keith and Marios Guide to Fast Websites
keithpitt
412
23k
Fireside Chat
paigeccino
41
3.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
250
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
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