Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ENTREGANDO UMA EXPERIÊNCIA MELHOR COM SWR
Search
Tailo Mateus Gonsalves
January 22, 2021
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ENTREGANDO UMA EXPERIÊNCIA MELHOR COM SWR
Tailo Mateus Gonsalves
January 22, 2021
More Decks by Tailo Mateus Gonsalves
See All by Tailo Mateus Gonsalves
BATE PAPO SOBRE A VIDA, A CARREIRA E TUDO MAIS!
tailomateus
0
24
React components - Melhores práticas
tailomateus
0
34
Chapter Lead
tailomateus
0
45
Arquitetura_Front-end.pdf
tailomateus
0
120
Other Decks in Programming
See All in Programming
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
5
1.4k
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
130
What We Talk About When We Talk About XP
m_seki
2
440
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
Deep dive into the select statement (GopherCon UK)
jespino
0
170
高専キャリア LT 発表内容
crysta1221
6
5.6k
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
100
Press start. Python's next generation.
willingc
PRO
3
320
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
130
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
460
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Facilitating Awesome Meetings
lara
57
7.1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
From π to Pie charts
rasagy
0
360
Speed Design
sergeychernyshev
33
2.1k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
650
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