hooks-home --- vscode user-snippets

{
    "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
Hello
", "\t);", "};\n", "export default observer($1);\n", ], }, }

你可能感兴趣的:(hooks-home --- vscode user-snippets)