Skip to content

Loading things before the UI (resolving hard dependencies on global.r) #920

Description

@D3SL

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 to mod("foo")$ui().

Is there a clean reliable way to do this that doesn't rely on hacky solutions like in #6 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions