Skip to content

Commit e1f7015

Browse files
authored
Update R/shinymod snippet (rafamadriz#469)
* feat: update R shinymod snippet The previously used module syntax has been deprecated for quite some time
1 parent 45a1b96 commit e1f7015

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

snippets/r.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,17 @@
118118
"shinymod": {
119119
"prefix": "shinymod",
120120
"body": [
121-
"${1:name}_UI <- function(id) {",
121+
"${1:name}UI <- function(id) {",
122122
" ns <- NS(id)",
123123
" tagList(",
124-
" ${0}",
124+
" ${2}",
125125
" )",
126126
"}",
127127
"",
128-
"${1:name} <- function(input, output, session) {",
129-
" ",
128+
"${1:name}Server <- function(id) {",
129+
" moduleServer(id, function(input, output, session) {",
130+
" ${3}",
131+
" })",
130132
"}\n"
131133
]
132134
}

0 commit comments

Comments
 (0)