Replies: 1 comment 2 replies
-
@ColinFay Removing the ability to load anything before I would maintain that "Golem fundamentally breaks any app where objects need to be instantiated before |
Beta Was this translation helpful? Give feedback.
-
I've seen from previous issues that Golem is adamantly opposed to the use of global.r, which can be accommodated with varying degrees of difficulty for anything that can be moved to server.r. What I can't figure out is how to refactor things that need to be loaded before the UI as well.
I use tidymodules for modules. It's the R6 class object approach but beefed up, with both the server and the UI built right in to each object. This means that I need to call
module_name$new("foo")
in global.r in order for the UI element to be ready in ui.r by the time it gets tomod("foo")$ui()
.Is there a clean reliable way to do this that doesn't rely on hacky solutions like in #6 ?
Beta Was this translation helpful? Give feedback.
All reactions