Best practices for global/external variables used in a module - shiny - RStudio Community
I wanted to know what others think is the best approach when making a shiny module that uses some functions/variables that in a non-module app would belong in global.R Do you still keep them in global.R? To me that seems to break the isolation and independence of modules, since a module should be explicit about all its inputs and outputs. As a concrete example: in the following app, the module UI and module server use a variable defined outside of it. Here's one way to write it: foodata