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
130
Other Decks in Programming
See All in Programming
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1k
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
110
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.1k
JRuby: Past, Present, and Future
headius
0
220
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
Verilogで学ぶCPU自作入門.pdf
uyuki234
7
3.9k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
140
速習iPhone Duo対応
yuukiw00w
2
920
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
520
Simple Storage Service(S3) is not simple
iwatsukayura
0
120
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
A Soul's Torment
seathinner
8
3.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Paper Plane
katiecoart
PRO
4
53k
Navigating Weather and Climate Data
rabernat
0
540
The Limits of Empathy - UXLibs8
cassininazir
1
690
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
590
First, design no harm
axbom
PRO
2
1.3k
Designing for Performance
lara
611
70k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
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