~/talk

Simplifying React Dialogs with Awaitable Promises

Talkat ReactNext 2024 · on Monday, 2024-06-24· [react, frontend-architecture]
slides:none on file

Claim: replace open-state plumbing with dialogs that return promises so code reads like if (await dialog("Are you sure?")) {...}. Implements small hooks — useQuestion, useDialog — plus a ~100-line dialogue context using React Context; demo integrates with a Remult-backed server-side grid and shows confirm-before-update flows. Built code is copy-pasteable; resolve callbacks drive the await semantics. The live demo runs and confirms the pattern reduces boilerplate and clarifies control flow.

AI-written summary · about

  1. 0:00Introduction
  2. 1:24Traditional dialog problems
  3. 2:49Live coding old approach
  4. 5:04Manual dialog issues
  5. 6:06Awaitable dialogs concept
  6. 6:48Live coding awaitable solution
  7. 7:53Simplified useDialog demo
  8. 9:21Custom dialog with resolve
  9. 10:03Benefits of awaiting dialogs
  10. 10:47Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.