Skip to content

Conversation

@simon-smart88
Copy link

Finally adding a suggestion to fix #4189 after doing this for the umpteenth time.

It would be nice if we could specify the file or module containing the problematic render function, but I am not sure how to do it.

@CLAassistant
Copy link

CLAassistant commented Dec 12, 2025

CLA assistant check
All committers have signed the CLA.

Comment on lines +331 to +335
# return an error when render functions are used in UI
if (is.null(getDefaultReactiveDomain())) {
stop("There is a renderXXX function in the UI, these should only be used in the server function.",
"Use the corresponding XXXOutput function in the UI instead.")
}
Copy link
Collaborator

@cpsievert cpsievert Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoot, sorry. I gave bad advice in #4189. We can't throw an error in this case -- if we do, we'll break renderXXX() usage inside of R Markdown. Unfortunately, I'm not sure there's sensible approach to throwing this error 😞

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Catch render functions included in UI

3 participants