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.js Life Cicle
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Raúl Palacios
May 13, 2019
Programming
0
22
React.js Life Cicle
Video de la presentación:
https://bit.ly/32kt9eT
Raúl Palacios
May 13, 2019
Tweet
Share
More Decks by Raúl Palacios
See All by Raúl Palacios
React Router VS MPA
raulpalacios
0
17
Other Decks in Programming
See All in Programming
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
CSC307 Lecture 05
javiergs
PRO
0
500
Patterns of Patterns
denyspoltorak
0
1.4k
AgentCoreとHuman in the Loop
har1101
5
230
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
dchart: charts from deck markup
ajstarks
3
990
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
Implementation Patterns
denyspoltorak
0
290
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
230
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Building Adaptive Systems
keathley
44
2.9k
From π to Pie charts
rasagy
0
120
Visualization
eitanlees
150
17k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
How to make the Groovebox
asonas
2
1.9k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Site-Speed That Sticks
csswizardry
13
1.1k
Transcript
Fases del ciclo de vida
Cada método tiene un prefijo will o did dependiendo de
si ocurren antes o después de cierta acción
MONTADO
constructor(props) • Inicializar el estado del componente • Enlazar eventos
• Setear variables globales Nota: El componente aun no se muestra
componentWillMount() • Modificar el estado • No realizar llamados a
API´s • No realizar suscripción a eventos Nota: El componente aun no se muestra
render() • Debe ser una funcion pura • No debe
modificar el estado Nota: El componente ya se muestra
componentDidMount() • El mejor momento para llamar API´s • Realizar
suscripciones a eventos • Modificar estado
ACTUALIZACIÓN
componentWillReceiveProps(nextProps) • Realizar cambios en los estados basado en las
nuevas propiedades
shouldComponentUpdate(nextProps, nextState) • Validar si queremos renderizar o no el
componente
componentWillUpdate(nextProps, nextState) • Realizar cualquier tipo de preparación Antes de
que se actualice la UI
render() • Debe ser una funcion pura • No debe
modificar el estado
componentDidUpdate(prevProps, prevState)
DESMONTADO
componentWillUnmount() • Dejar de escuchar eventos • Desuscribirse de un
WebSocket • Cancelar peticiones HTTP
ERRORES
componentDidCatch() • Control de errores