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 + Statecharts: Repensando seu frontend co...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Filipe Monteiro
June 02, 2018
Programming
0
550
React + Statecharts: Repensando seu frontend com máquina de estados finitos
Filipe Monteiro
June 02, 2018
Tweet
Share
More Decks by Filipe Monteiro
See All by Filipe Monteiro
React + Statecharts - Repensando seu frontend com máquina de estados
filipemonteiroth
1
100
Other Decks in Programming
See All in Programming
CSC307 Lecture 06
javiergs
PRO
0
690
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
Package Management Learnings from Homebrew
mikemcquaid
0
230
今から始めるClaude Code超入門
448jp
8
9.1k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Data-Centric Kaggle
isax1015
2
780
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
330
Oxlint JS plugins
kazupon
1
1k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
140
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
260
Embracing the Ebb and Flow
colly
88
5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
750
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
170
RailsConf 2023
tenderlove
30
1.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Believing is Seeing
oripsolob
1
58
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
Transcript
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!