Skip to content

Commit

Permalink
Update R/shinymod snippet (#469)
Browse files Browse the repository at this point in the history
* feat: update R shinymod snippet

The previously used module syntax has been deprecated for quite some time
  • Loading branch information
wurli authored Jul 15, 2024
1 parent 45a1b96 commit e1f7015
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions snippets/r.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,17 @@
"shinymod": {
"prefix": "shinymod",
"body": [
"${1:name}_UI <- function(id) {",
"${1:name}UI <- function(id) {",
" ns <- NS(id)",
" tagList(",
" ${0}",
" ${2}",
" )",
"}",
"",
"${1:name} <- function(input, output, session) {",
" ",
"${1:name}Server <- function(id) {",
" moduleServer(id, function(input, output, session) {",
" ${3}",
" })",
"}\n"
]
}
Expand Down

0 comments on commit e1f7015

Please sign in to comment.