/
alkis
/
nvim
Обзор
Документация
Войти
/
alkis
/
nvim
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
snippets/typescriptreact.json
83 строки
1 KB
avkis
Last changes
30 июн 2025, 06:49
30 июн 2025, 06:49
dce13aa
Код
Авторство
О чём код?
{ "Create component": { "prefix": [ "rfc" ], "body": [ "'use client'", "", "import React from 'react'", "", "export interface ${1:Component}Props {", "\t${2:name}: string", "}", "", "const $1 = (props: $1Props) => {", "\tconst { ${2:name} } = props", "\treturn (", "\t\t<div className=\"$0\">", "\t\t\t${1:Component} { ${2:name} }", "\t\t</div>", "\t)", "}", "", "export default $1" ], "description": "Create a react functional component with interface" }, "NextJS Layout": { "prefix": [ "nlt" ], "body": [ "'use client'", "", "import { ReactNode } from 'react'", "", "interface ${1:Layout}Props {", "\tchildren: ReactNode;", "}", "", "const $1 = ({", "\tchildren,", "}: $1Props) => {", "", "\treturn (", "\t\t<div className=\"$0\">", "\t\t\t{children}", "\t\t</div>", "\t)", "}", "export default $1" ], "description": "Create a NextJS layout with default export" }, "Create NextJS Page": { "prefix": [ "npg" ], "body": [ "const ${1:Page} = () => {", "\treturn (", "\t\t<div className=\"${2:flex}\">", "\t\t\t$0", "\t\t</div>", "\t)", "}", "export default $1" ], "description": "Create a Next routing Page" }, "Create Arrow Function": { "prefix": [ "arf" ], "body": [ "const ${1:name} = () => {", "\t$0", "\treturn ${2:null}", "}" ], "description": "Create an Arror Function" } }