reactlog
Shiny Reactivity Visualizer
reactlog is a debugging tool that visualizes the reactive dependency graph of Shiny applications. It logs reactive interactions during app execution and displays them as an interactive directed graph, helping developers understand and debug Shiny’s reactive behavior.
The tool identifies common reactivity issues like unused reactive elements, over-utilized computations, unexpected dependencies, and invalidation problems. It provides interactive features including time-travel debugging through reactive history, family tree highlighting and filtering, and element search. This visibility into Shiny’s reactive system helps developers optimize performance and fix bugs that would be difficult to diagnose from code inspection alone.
Contributors#
Resources featuring reactlog#
Programming Games with Shiny || Roll the Dice: with Quosures! || RStudio
00:00 Introduction
03:44 The pain of copy + paste
07:28 Going on a helper function adventure!
18:09 Ready for rlang
28:17 !! + enquo()
37:57 Benefits of the rlang approach
38:46 Embracing the embrace operator
41:33 Visualizing what’s happening using reactlog
You’ve most likely used Shiny to build a web app that displays data, but you can also use Shiny to build games! In this video series, Jesse and Barret pair program simply games in Shiny as a way to uncover and explore new features.
Read up on the embrace operator here: https://rlang.r-lib.org/reference/embrace-operator.html
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) and Jesse Mostipak (@kierisi) Animation, motion design, and editing: Jesse Mostipak (@kierisi)
Theme song: Hakodate Line by Blue Dot Sessions (https://app.sessions.blue/browse/track/111291" )

Barret Schloerke || {reactlog} Rundown || RStudio
00:00 Introduction to Reactlog 00:44 Viewing Reactlog using an Old Faithful Shiny app 02:07 The Reactlog interface 04:31 Walking through a reactive graph with Reactlog 05:14 Downstream dependency invalidation in Shiny 06:43 How Shiny “grabs” data 09:41 How the Reactlog timeline works 10:46 Switching between idle states in Reactlog 11:58 Reactlog interactivity - clicking a single item 13:21 Reactlog with the Pythagoras Theorem app 15:45 Adding a UI and server value to add Reactlog to your Shiny app 18:05 Walking through the reactive graph using the Pythagorean Theorem app 21:07 Append-only behavior of Reactlog 21:18 Marking a time point in Reactlog 23:17 Using Reactlog to debug reactivity 26:55 Resetting our app and testing logic changes 28:01 Reactlog with a large Shiny app, CRANwhales 34:10 Freezing reactive values 36:19 Calculating click count in a Shiny app 37:10 Click the button, render the plot is bad - see why
Shiny is an R package from RStudio that makes it incredibly easy to build interactive web applications with R. Behind the scenes, Shiny builds a reactive graph that can quickly become intertwined and difficult to debug. reactlog provides a visual insight into that black box of Shiny reactivity.
After logging the reactive interactions of a Shiny application, reactlog constructs a directed dependency graph of the Shiny’s reactive state at any time point in the record. The reactlog dependency graph provides users with the ability to visually see if reactive elements are:
- Not utilized (never retrieved)
- Over utilized (called independently many times)
- Interacting with unexpected elements
- Invalidating all expected dependencies
- Freezing (and thawing), preventing triggering of future reactivity
There are many subtle features hidden throughout reactlog. Here is a short list quickly describing what is possible within reactlog:
- Display the reactivity dependency graph of your Shiny applications
- Navigate throughout your reactive history to replay element interactions
- Highlight reactive family trees
- Filter on reactive family trees
- Search for reactive elements
You can read more about reactlog here: https://rstudio.github.io/reactlog/articles/reactlog.html And you can learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) Design & editing: Jesse Mostipak (@kierisi)

Barret Schloerke | Reactlog 2.0 Debugging the state of Shiny | RStudio (2019)
The revamped reactlog provides an updated visual display to traverse through the reactive behavior within your shiny application. Using live shiny applications, we will use reactlog’s directed dependency graph to find missing reactive dependencies in “working” applications and address suboptimal reactive coding patterns. Correcting these coding patterns will reduce the amount of calculations done by shiny and keep reactive objects from being created unnecessarily.
VIEW MATERIALS http://github.com/schloerke/presentation-2019-01-18-reactlog
About the Author Barret Schloerke I specialize in Large Data Visualization where I utilize the interactivity of a web browser, the fast iterations of the R programming language, and large data storage capacity of Hadoop



