$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
React 16.3 - O que veio de novo?
Search
Guilherme Varandas
May 04, 2018
Programming
0
63
React 16.3 - O que veio de novo?
Apresentação no primeiro "React BSB", apresentando o que veio de novo no release 16.3 do React.
Guilherme Varandas
May 04, 2018
Tweet
Share
More Decks by Guilherme Varandas
See All by Guilherme Varandas
Webpack: Poder ilimitado em suas mãos
gvarandas
1
58
Quer integrar seu app com React-Native? Pergunte-me como.
gvarandas
1
210
Como manter a saúde do seu projeto JS (e a sanidade do seu time)
gvarandas
0
68
Other Decks in Programming
See All in Programming
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
32
15k
FluorTracer / RayTracingCamp11
kugimasa
0
150
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
990
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
4
1.6k
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
10k
AI時代もSEOを頑張っている話
shirahama_x
0
210
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
130
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
12
5.2k
connect-python: convenient protobuf RPC for Python
anuraaga
0
330
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
110
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
5
1k
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
770
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Side Projects
sachag
455
43k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
RailsConf 2023
tenderlove
30
1.3k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Optimizing for Happiness
mojombo
379
70k
The Cult of Friendly URLs
andyhume
79
6.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Building Adaptive Systems
keathley
44
2.8k
Transcript
react O QUE VEIO DE NOVO 16.3
GUILHERME GVARANDAS JIROTHEONE NOVATICS/BB
LANÇADO EM 03/2013 16.3 EM 29/03 VERSÃO ATUAL - 16.3.2
context api morte ao redux?
fonte de dados estado centralizado utilizado pelo redux estável no
react@^16.3
None
None
None
context provider consumer children
Context { Provider, Consumer }
Provider disponibiliza um estado comum
Consumer conecta com o contexto
createRef forwardRef
o que é ref? declarativo vs imperativo
legado string callback ⚰
createRef
encapsulamento apresentação componente temificado higher order components delegação de referência
forwardRe f
ciclo de vida simplificação
muitas opções muitas possibilidades de erro bloqueio do render possíveis
memory leaks
bloqueio do render inicial possíveis memory leaks evolução do modelo
original async rendering mode compilador react (prepack.io)
componentWillMount RIP ⚰ componentWillReceiveProps componentWillUpdate
16.3.2 16.X 17.X “deprecated” deprecation warnings prefixo “UNSAFE_”
getDerivedStateFromProps novos métodos getSnapshotBeforeUpdate
gdfp getDerivedStateFromProps invocado após ser instanciado ou antes de um
re-render
gdfp getDerivedStateFromProps
gdfp getDerivedStateFromProps retorna um estado puro para merge não tem
acesso ao “this” método estático
gdfp getDerivedStateFromProps substitui componentWillReceiveProps deve declarar state inicial callbacks =>
componentDidUpdate ⚠
gsbu getSnapshotBeforeUpdate invocado antes do DOM ser atualizado
gsbu getSnapshotBeforeUpdate parâmetro => componentDidUpdate
None
StrictMode olar debug
None
ciclos de vida depreciados ref api legado (string) possíveis efeitos
colaterais StrictMode
None
render phase (lento) compara modificações (diff) commit phase (rápido) aplica
modificações no DOM
evita mudanças não determinísticas constructor render setState getDerivedStateFromProps
⚠ não tem efeito em builds de produção
recap tá liberado anotar
API de contexto createRef / forwardRef novo ciclo de vida
StrictMode component
confira nosso post sobre a api de contexto !nyurl.com/nova!csreactapi
É NOIS VALEU