2:15 - 2:45 PM - Sharing app state between Shiny modules
Marcin Dubel
One of the powerful features of Shiny is the ability to create modularised apps, where different parts of the app are organised into separate modules. That approach allows to avoiding code duplication and keeps the scripts simple. However, managing the state of a Shiny app that consists of multiple modules can be challenging. When using modules the purpose of the design should be to keep them as independent as possible. Yet modules are a part of the larger application and have to react to user actions in other modules. In this talk, we will explore different techniques for sharing app state between Shiny modules. We will discuss the use of global variables, reactive values, and custom modules for managing app state. We will also discuss best practices for debugging and testing Shiny apps with multiple modules. Finally, we will demonstrate how these techniques can be used to build more complex and scalable Shiny apps.