36 lines
965 B
Text
36 lines
965 B
Text
{
|
|
"onRequest": {
|
|
"scope": "javascriptreact,typescriptreact",
|
|
"prefix": "qonRequest",
|
|
"description": "onRequest function for a route index",
|
|
"body": [
|
|
"export const onRequest: RequestHandler = (request) => {",
|
|
" $0",
|
|
"};",
|
|
],
|
|
},
|
|
"loader$": {
|
|
"scope": "javascriptreact,typescriptreact",
|
|
"prefix": "qloader$",
|
|
"description": "loader$()",
|
|
"body": ["export const $1 = routeLoader$(() => {", " $0", "});"],
|
|
},
|
|
"action$": {
|
|
"scope": "javascriptreact,typescriptreact",
|
|
"prefix": "qaction$",
|
|
"description": "action$()",
|
|
"body": ["export const $1 = routeAction$((data) => {", " $0", "});"],
|
|
},
|
|
"Full Page": {
|
|
"scope": "javascriptreact,typescriptreact",
|
|
"prefix": "qpage",
|
|
"description": "Simple page component",
|
|
"body": [
|
|
"import { component$ } from '@builder.io/qwik';",
|
|
"",
|
|
"export default component$(() => {",
|
|
" $0",
|
|
"});",
|
|
],
|
|
},
|
|
}
|