Multiple textInput and multiple outputURL for ShinyApp

Hi,

I have created a shinydashboard that will render one URL when a specific value is placed in for the textInput.

ie
Input text XYZ - Output renders a link to a unique URL

I have created functionality for one text input type but how do I add multiple/more text inputs and an associated URL for each one.
So for each time the actionButton is clicked for a particular unique text it will return a unique URL.

Code below.. thanks!

library(shiny)

ui <- fluidPage(
titlePanel("Show Onscreen Image"),
sidebarLayout(
sidebarPanel(
textInput("Venue", label = "Venue", value = "Office Pi", placeholder = "Venue Name"),
actionButton("showU","Show Venue")
),
mainPanel(
conditionalPanel(
condition = "input.showU > 0",
uiOutput("url")
)
)
)
)

server <- function(input,output){
observeEvent(input$showU,{
output$url <-renderUI(a(href=paste0('https://example.com), "Display Content", target="_blank"))

})
}

shinyApp(ui = ui ,server = server)

runnApp("Gu Dashboard", display.mode = "normal")

Broadly speaking there are two approaches

  1. have the button press extend a list of url data that you maintain, and that can be the formula for a renderfunction that can show the contents of that list
  2. have the button press make the next url and use shiny::insertUI to add a unique ui element that represents the url.

I would typically go for 1) is it fits in with a model-view-controller type philosophy where the app developer maintains a data representation of whats shown , as this helps with extensibility, like if you decide you want a button that lets a download report of all the urls get generated, whereas the secondary approach which just fires and forgets would not be easily extended, and would likely need a rewrite to the first paradigm.

Fantastic, thankyou @nirgrahamuk option 1 it is!

How do code to add a line to render an additional URL?