Here is a simple app where the user can either type (numericInput, bpm_numeric) or slide (sliderInput, bpm_slider) the input value. Both of these UI elements should stay in-sync with either choice. However, the output only needs to be tracked once. Below I am tracking it twice, but I only need one copy of the "selection/input" from the user. I think I need to use reactiveValues, but I am not sure of the approach.
library(shiny)
ui <- fluidPage(
titlePanel("Reverb & Delay Calculator"),
sidebarLayout(
sidebarPanel(
uiOutput("bpm_numeric"),
uiOutput("bpm_slider")
),
mainPanel(
p("Numeric value is:"),
verbatimTextOutput("numeric_val"),
p("Slider value is:"),
verbatimTextOutput("slider_val")
)
)
)
server <- function(input, output, session) {
output$bpm_numeric = renderUI({
numericInput(
"bpm_numeric",
"BPM Numeric",
value = 60, min = 40, max = 300
)
})
output$bpm_slider = renderUI({
sliderInput(
"bpm_slider",
"BPM Slider",
value = 60, min = 40, max = 300
)
})
# See how I can track "both", but really I only need to track "one" since
# they should stay in-sync with one another. Maybe reactiveValues???
output$numeric_val <- renderText({ input$bpm_numeric })
output$slider_val <- renderText({ input$bpm_slider })
observeEvent(input$bpm_numeric, {
val = input$bpm_numeric
updateSliderInput(session, "bpm_slider", value = val)
})
observeEvent(input$bpm_slider, {
val = input$bpm_slider
updateNumericInput(session, "bpm_numeric", value = val)
})
}
shinyApp(ui = ui, server = server)
NOTE: While I am currently using uiOuput() + renderUI() + update___Input(), this is not necessarily a requirement. I am open to other approaches provided that the input UI's stay in sync I have one copy of the synced output.

renderTextblocks? TheobserveEventblocks make sure that they stay in sync, from there anything that needs that value should be able to depend on only one of them.renderTextoutputs?coalescethat gives you just the first non-null of its arguments; it seems like you want something akin to that here. I don't find any utility in that, frankly, since: (1) I know the id of all of them so can pick one, and (2) I control the up-to-date-ness of all candidates. In a more complicated example, trying to conditionally depend on more than one can easily result in repeat-dependencies, causing at best flickering, possibly unnecessary computation.