~/talk

Thinking of UI as a State Machine

Talkat React Day Bangalore 2021 · 2021-03-19..03-20· [react, frontend-architecture]
slides:none on file

Argues that complex UI behavior should be modeled as a finite state machine so event handling (clicks, socket events, API responses, hardware disconnects) maps deterministically to transitions. Describes a small POC inspired by xstate.js: a reusable class plus a hook for React, a subscriber bus, and handlers that run on-enter/on-exit; used in warehouse hardware readers and a ride-booking demo. Results: transitions become predictable, recovery and auto-retry simpler, but the model has a learning curve and risks state explosion.

AI-written summary · about

  1. 0:00Start
  2. 1:06Thinking of Ui as a Finite State Machine
  3. 1:35What Is an Fsm or a Finite State Machine
  4. 2:13Mathematical Model of Computation
  5. 8:08Why Do We Need To Use State Machines
  6. 10:24Api Calls
  7. 12:39Nested Switch Statement
  8. 16:04Dispatch Event
  9. 16:57Validation
  10. 17:49Ride-Sharing App
  11. 19:46Event Context
  12. 24:29Demo
  13. 26:04Xstate Js
  14. 27:28State Explosion
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.