countup_update: Update

View source: R/proxy.R

countup_updateR Documentation

Update

Description

Update the counter.

Usage

countup_update(counter, update)

Arguments

counter

An object of class countupProxy as returned by countupProxy().

update

Integer to update to.

Value

The counter

Examples

library(shiny)

ui <- fluidPage(
  countupOutput("cnt"),
  actionButton("Update", "start")
)

server <- function(input, output, session) {

  output$cnt <- renderCountup({
    countup(24)
  })

  observeEvent(input$start, {
    countupProxy("cnt") %>% 
      countup_update(50)
  })

}

## Not run: shinyApp(ui, server)


JohnCoene/countup documentation built on Jan. 21, 2025, 12:46 p.m.