hooks-market --- vscode user-snippets

{
    "hooks-market": {
        "scope": "javascript, typescript, javascriptreact, typescriptreact",
        "prefix": "hooks-market",
        "body": [
            "import React, { useEffect, useState } from 'react';",
            "import { withRouter, RouteComponentProps, useHistory, Link } from 'react-router-dom';",
            "import { observer } from 'mobx-react';",
            "import { Button } from '@material-ui/core';",
            "import { styled } from '@material-ui/core/styles';",
            "import { isEmpty } from 'lodash';\n",

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

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

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

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

                "\treturn (",
                    "\t\t
Hello
", "\t);", "};\n", "export default withRouter(observer($1));\n", ], }, }

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