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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Filipe Monteiro
June 02, 2018
Programming
560
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
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
Modding RubyKaigi for Myself
yui_knk
0
910
Lessons from Spec-Driven Development
simas
PRO
0
150
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
730
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
230
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
120
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
3Dシーンの圧縮
fadis
1
680
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.9k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
210
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
680
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
550
Featured
See All Featured
The browser strikes back
jonoalderson
0
1.2k
Writing Fast Ruby
sferik
630
63k
Tell your own story through comics
letsgokoyo
1
950
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
230
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Side Projects
sachag
455
43k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
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!