|
| 1 | +{ |
| 2 | + "Component Static Default Props": { |
| 3 | + "prefix": "_defaultProps", |
| 4 | + "body": "static defaultProps: Partial<${TM_FILENAME_BASE}Props> = {0ドル};" |
| 5 | + }, |
| 6 | + "Component Static Get Derived State From Props": { |
| 7 | + "prefix": "_getDerivedStateFromProps", |
| 8 | + "body": "static getDerivedStateFromProps(${1:nextProps}: ${3:${TM_FILENAME_BASE}${2:Props}}, ${4:prevState}: ${6:${TM_FILENAME_BASE}${5:State}}): Partial<${TM_FILENAME_BASE}${5:State}> {0ドル}" |
| 9 | + }, |
| 10 | + "Component Set State": { |
| 11 | + "prefix": "_setState", |
| 12 | + "body": "this.setState(1ドル);0ドル" |
| 13 | + }, |
| 14 | + "Component Constructor": { |
| 15 | + "prefix": "_constructor", |
| 16 | + "body": [ |
| 17 | + "constructor(${1:props}: ${3:${TM_FILENAME_BASE}${2:Props}}) {", |
| 18 | + "\tsuper(${1:props});", |
| 19 | + "", |
| 20 | + "\t4ドル", |
| 21 | + "}" |
| 22 | + ] |
| 23 | + }, |
| 24 | + "Component Will Mount": { |
| 25 | + "prefix": "_componentWillMount", |
| 26 | + "body": "componentWillMount() {0ドル}", |
| 27 | + "description": "DEPRECATION WARNING [v16.3]: Use `componentDidMount` instead." |
| 28 | + }, |
| 29 | + "Component Did Mount": { |
| 30 | + "prefix": "_componentDidMount", |
| 31 | + "body": "componentDidMount() {0ドル}" |
| 32 | + }, |
| 33 | + "Component Will Receive Props": { |
| 34 | + "prefix": "_componentWillReceiveProps", |
| 35 | + "body": "componentWillReceiveProps(${1:nextProps}: ${3:${TM_FILENAME_BASE}${2:Props}}) {0ドル}", |
| 36 | + "description": "DEPRECATION WARNING [v16.3]: Use `static getDerivedStateFromProps` instead." |
| 37 | + }, |
| 38 | + "Should Component Update": { |
| 39 | + "prefix": "_shouldComponentUpdate", |
| 40 | + "body": "shouldComponentUpdate(${1:nextProps}: ${3:${TM_FILENAME_BASE}${2:Props}}, ${4:nextState}: ${6:${TM_FILENAME_BASE}${5:State}}) {0ドル}" |
| 41 | + }, |
| 42 | + "Component Will Update": { |
| 43 | + "prefix": "_componentWillUpdate", |
| 44 | + "body": "componentWillUpdate(${1:nextProps}: ${3:${TM_FILENAME_BASE}${2:Props}}, ${4:nextState}: ${6:${TM_FILENAME_BASE}${5:State}}) {0ドル}", |
| 45 | + "description": "DEPRECATION WARNING [v16.3]: Use `componentDidUpdate` instead." |
| 46 | + }, |
| 47 | + "Component Did Update": { |
| 48 | + "prefix": "_componentDidUpdate", |
| 49 | + "body": "componentDidUpdate(${1:nextProps}: ${3:${TM_FILENAME_BASE}${2:Props}}, ${4:nextState}: ${6:${TM_FILENAME_BASE}${5:State}}) {0ドル}" |
| 50 | + }, |
| 51 | + "Component Will Unmount": { |
| 52 | + "prefix": "_componentWillUnmount", |
| 53 | + "body": "componentWillUnmount() {0ドル}" |
| 54 | + }, |
| 55 | + "Component Did Catch": { |
| 56 | + "prefix": "_componentDidCatch", |
| 57 | + "body": "componentDidCatch(${1:error}: Error, ${2:errorInfo}: React.ErrorInfo) {0ドル}" |
| 58 | + }, |
| 59 | + "Component Render": { |
| 60 | + "prefix": "_render", |
| 61 | + "body": [ |
| 62 | + "render() {", |
| 63 | + "\treturn (0ドル);", |
| 64 | + "}" |
| 65 | + ] |
| 66 | + } |
| 67 | +} |
0 commit comments