hooks-home --- vscode user-snipp

2022-09-08  本文已影响0人  wlianfu
{
    "hooks-home": {
        "scope": "javascript, typescript, javascriptreact, typescriptreact",
        "prefix": "hooks-home",
        "body": [
            "import React, { useEffect, useState } from 'react';",
            "import { useNavigate } from 'react-router-dom';",
            "import { observer } from 'mobx-react';",
            "import { Button } from '@mui/material';",
            "import { styled } from '@mui/system';",
            "import { isEmpty } from 'lodash';\n",

            "import Color from '@tool/color';\n",

            "interface IProps {}",
            "interface IState {}\n",

            "const $1 = (props: IProps, state: IState) => {",
                "\tconst navi = useNavigate();\n",

                "\tuseEffect(() => {",
                    "\t\treturn () => {};",
                "\t}, []);\n",

                "\treturn (",
                    "\t\t<section className=\"hello\">Hello</section>",
                "\t);",
            "};\n",

            "export default observer($1);\n",
        ],
    },
}
上一篇 下一篇

猜你喜欢

热点阅读