React.js script breaks binding between actionButton and server.

In my Shiny app I have UI generated with React.js scripts. I include them in my fluidPage using tags$script. On the page there is also an actionButton. On the server side I have an observeEvent function that should print 10 to the RStudio console every time the button is clicked. I have noticed that including the React scripts breaks binding between the button and the server. Commenting out the last tags$script will make the click event observable again, but the UI is then not loaded. I tried to open the page in Chrome, then put Shiny.bindAll(); in console, but it didn't change anything.


ui <- fluidPage(
  #React scripts


server <- function(input, output) {
  observeEvent(input$but, {

If you're willing to give up on actionButton(), here's a blog link about a better way to handle buttons (and links, for that matter) in Shiny.


This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.