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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Tailo Mateus Gonsalves
January 22, 2021
Programming
110
0
Share
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
19
React components - Melhores práticas
tailomateus
0
23
Chapter Lead
tailomateus
0
33
Arquitetura_Front-end.pdf
tailomateus
0
120
Other Decks in Programming
See All in Programming
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
180
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
160
OTP を自動で入力する裏技
megabitsenmzq
0
130
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
280
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
300
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
150
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
110
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
580
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
110
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.3k
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
480
Featured
See All Featured
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
340
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
470
For a Future-Friendly Web
brad_frost
183
10k
Abbi's Birthday
coloredviolet
2
6.2k
Amusing Abliteration
ianozsvald
1
150
A Tale of Four Properties
chriscoyier
163
24k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
260
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
500
So, you think you're a good person
axbom
PRO
2
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