The goal of shinysnippets is to save development time while taking advantage of Rstudio snippets for Shiny applications.
You can install the dev of {shinysnippets} from GitHub:
remotes::install_github("Thinkr-open/shinysnippets")
Then run:
shinysnippets::add_snippets()
You’ll be asked to validate the writing of the snippets in ~/.R/snippets/r.snippets
.
Restart RStudio to make these snippets effective.
snippet module
${1:name}ui <- function(id){
ns <- NS(id)
tagList(
)
}
${1:name} <- function(input, output, session){
ns <- session\$ns
}
# Copy in UI
${1:name}ui("${1:name}ui")
# Copy in server
callModule(${1:name}, "${1:name}ui")
Please note that the ‘shinysnippets’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.