~/talk

Why Is It Triggering Twice? Understanding Shiny Reactivity

Talkat ShinyConf 2025 · 2025-04-09..04-11· [frontend-architecture]
name:Rio Sinan
links:none on file
links:none on file
slides:none on file

Explains why Shiny reactivity reruns by showing a calories calculator that initially recomputes four slow steps (artificial 1s delays) on every input change, then refactors into focused reactives, adds reactiveVal vs reactive and observer patterns to stop unnecessary invalidations, uses isolate() and observeEvent(ignoreInit) to prevent startup double-runs, reads/saves user settings via cookies (causing an extra init run until debounced), and applies bindCache so repeated gender/activity lookups drop from ~2s to ~1s; demonstration runs and performance wins are shown with concrete timings.

AI-written summary · about

  1. 0:00Introduction to reactivity
  2. 12:33Core reactive elements
  3. 27:31Reactives in production lines
  4. 39:26Reactive vs reactiveVal
  5. 51:17Unexpected triggers and isolate
  6. 1:02:31Reading from cookies
  7. 1:12:58Break and recap
  8. 1:22:41Controlling execution with rack and bounce
  9. 1:32:06Removing the action button
  10. 1:41:11Optimizing reactivity with bindCache
  11. 1:47:42Best practices summary
~/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.