project-tpl
前端和 egg.js 常用的代码片段,直接输入前缀会车即可生成对应的代码片段,提高开发效率!
命令
| 命令 |
含义 |
| class |
react 中的 class 组件 |
| class-props |
react 中的 class 组件,包含 proptypes |
| class-all |
react 中的 class 组件,包括全部生命周期 |
| getDerivedStateFromProps |
react 中的 class 组件中的 getDerivedStateFromProps 函数 |
| getDerivedStateFromError |
react 中的 class 组件中的 getDerivedStateFromError 函数 |
| getSnapshotBeforeUpdate |
react 中的 class 组件中的 getSnapshotBeforeUpdate 函数 |
| componentDidCatch |
react 中的 class 组件中的 componentDidCatch 函数 |
| componentDidMount |
react 中的 class 组件中的 componentDidMount 函数 |
| shouldComponentUpdate |
react 中的 class 组件中的 shouldComponentUpdate 函数 |
| componentDidUpdate |
react 中的 class 组件中的 componentDidUpdate 函数 |
| componentWillUnmount |
react 中的 class 组件中的 componentWillUnmount 函数 |
| func |
react 中的 function 组件 |
| useState |
react hook 之 useState |
| useEffect |
react hook 之 useEffect |
| useLayoutEffect |
react hook 之 useLayoutEffect |
| useCallback |
react hook 之 useCallback |
| useMemo |
react hook 之 useMemo |
| useRef |
react hook 之 useRef |
| controller |
egg.js 中的 controller 模版 |
| service |
egg.js 中的 service 模版 |
| |