Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle singletons and head tags in React context #16

Open
kamilzyla opened this issue May 26, 2021 · 1 comment
Open

Handle singletons and head tags in React context #16

kamilzyla opened this issue May 26, 2021 · 1 comment
Assignees
Labels

Comments

@kamilzyla
Copy link
Collaborator

In Shiny you can use e.g. singleton(tags$head(tags$script(...))) to add some code to document head. This is sometimes used by libraries (e.g. shinyAce, shiny.router) to add dependencies instead of htmlDependency(). However singletons and head tags currently don't work properly in React context.

Note: It is often possible to work around this issue by including the dependencies / mock component manually outside of React context. For example, you can put div(style = "display: none", shinyAce::aceEditor(NULL)) anywhere outside of React to load the dependencies and make aceEditor() work also within React.

@kamilzyla kamilzyla added the 13 SP Story points label Nov 16, 2021
@jakubsob jakubsob self-assigned this Jan 26, 2023
@jakubsob
Copy link
Collaborator

jakubsob commented Mar 9, 2023

tags$head and tags wrapped in singleton should be handled in:

  • renderReact
  • reactContext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants