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
React + Statecharts: Repensando seu frontend co...
Search
Filipe Monteiro
June 02, 2018
Programming
570
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React + Statecharts: Repensando seu frontend com máquina de estados finitos
Filipe Monteiro
June 02, 2018
Transcript
28 slides
Filipe Monteiro
React + Statecharts Repensando seu frontend com máquina de estados
Gerenciar estado é difícil
AutoLogout component •Definir um estado inicial de logado e trabalhando
•Observa o mouse move / key down •Uma vez idle, após algum tempo definido •Logout
None
None
None
Bottom-up •Foca em transições lineares •Difícil de entender •Mais suscetível
a bugs a medida que o código cresce •Cria estados não previsíveis
Statecharts
Máquina de estados finitos “ Uma máquina abstrata que está
em um único estado em determinado momento”
Máquina de estados finitos “ Que pode mudar de um
estado para outro de acordo com uma entrada/evento”
Máquina de estados finitos A B B C C
Statecharts
“ Um conceito visual para sistemas complexos” David Harel, 1987
Statecharts São uma extensão ou uma máquina de estados melhorada.
Statecharts •Estados aninhados (clustering) •Ortogonalidade •Condições nas transações (guards) •Ações
(onEntry, onExit)
Statecharts “ Um statechart é uma caixa mágica: Você fala
o que aconteceu e ela te diz o que fazer” Luca Matteis, 2018
xstate + react-automata
None
None
None
None
None
None
None
None
“Tendência para 2018: Todo mundo vai começar a usar máquina
de estado (explícita) para UIs” Max Stoiber, 2018
Obrigado!
More Decks by Filipe Monteiro
See All by Filipe Monteiro
React + Statecharts - Repensando seu frontend com máquina de estados
filipemonteiroth
1
110
Other Decks in Programming
See All in Programming
AI-Powered Domain-Driven Design
ziobrando
0
460
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
200
Getting Started with Vibe Coding
miccheng
0
240
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Distance field of Julia set
kinakomoti321
0
330
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
380
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
Ruby から Emacs を操作したい
phigasui
0
320
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
370
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
290
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.4k
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
990
4 Signs Your Business is Dying
shpigford
187
23k
Paper Plane
katiecoart
PRO
6
55k
Why Our Code Smells
bkeepers
PRO
340
58k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Technical Leadership for Architectural Decision Making
baasie
4
650
Side Projects
sachag
456
43k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.8k
Navigating Team Friction
lara
192
16k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k