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
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
110
Other Decks in Programming
See All in Programming
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
33k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.8k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
620
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
sbt 2.0: takeoff
eed3si9n
0
160
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
970
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
Featured
See All Featured
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Designing Experiences People Love
moore
143
24k
Navigating Team Friction
lara
192
16k
The Curse of the Amulet
leimatthew05
3
16k
Mind Mapping
helmedeiros
1
400
Building the Perfect Custom Keyboard
takai
2
910
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
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!