~/talk

How to Delegate your React Dialogs

Talkat React Finland 2021 · 2021-08-30..09-03· [react]
slides:none on file

Claim: hide modal state and markup behind a button so containers lose clutter and repeated modals. Built a DeleteButton that moves state into a useConfirmation hook which returns a Promise and resolves on confirm or rejects on cancel. Saves roughly 20 lines in the container, replaces N per-page modals with one context-backed modal provider, demo shows delete button triggering a toast so it works. Notes that this last step can be overengineering and recommends starting from third-party libs then adapting.

AI-written summary · about

  1. 0:00React dialog delegation intro
  2. 1:08Refactoring dialogs
  3. 2:55Custom confirmation buttons
  4. 4:39Avoid over-engineering
  5. 5:43Context for dialog state
  6. 7:12Q&A
~/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.