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
React 16.3 - O que veio de novo?
Search
Guilherme Varandas
May 04, 2018
Programming
0
61
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
57
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
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
20
10k
AIエージェント開発、DevOps and LLMOps
ymd65536
1
380
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
2
1.4k
Go言語での実装を通して学ぶLLMファインチューニングの仕組み / fukuokago22-llm-peft
monochromegane
0
120
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
220
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.4k
TanStack DB ~状態管理の新しい考え方~
bmthd
2
490
速いWebフレームワークを作る
yusukebe
5
1.7k
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
960
Protocol Buffersの型を超えて拡張性を得る / Beyond Protocol Buffers Types Achieving Extensibility
linyows
0
110
1から理解するWeb Push
dora1998
7
1.8k
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
140
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Automating Front-end Workflow
addyosmani
1370
200k
Music & Morning Musume
bryan
46
6.8k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Code Reviewing Like a Champion
maltzj
525
40k
Speed Design
sergeychernyshev
32
1.1k
How STYLIGHT went responsive
nonsquared
100
5.8k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
Practical Orchestrator
shlominoach
190
11k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Into the Great Unknown - MozCon
thekraken
40
2k
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