|
84 | 84 | "componentWillReceiveProps": { |
85 | 85 | "prefix": "cwr", |
86 | 86 | "body": "componentWillReceiveProps(nextProps) {\n\t$0\n}\n", |
87 | | - "description": "Invoked when a component is receiving new props. This method is not called for the initial render." |
| 87 | + "description": "Invoked when a component is receiving new props. This method is not called for the initial render. [DEPRECATION NOTE]: This method is deprecated in React 16.3" |
88 | 88 | }, |
89 | 89 |
|
90 | 90 | "shouldComponentUpdate": { |
|
96 | 96 | "componentWillUpdate": { |
97 | 97 | "prefix": "cwup", |
98 | 98 | "body": "componentWillUpdate(nextProps, nextState) {\n\t$0\n}\n", |
99 | | - "description": "Invoked immediately before rendering when new props or state are being received." |
| 99 | + "description": "Invoked immediately before rendering when new props or state are being received. [DEPRECATION NOTE]: This method is deprecated in React 16.3" |
100 | 100 | }, |
101 | 101 |
|
102 | 102 | "componentDidUpdate": { |
|
298 | 298 | "prefix": "ptshr", |
299 | 299 | "body": "PropTypes.shape({\n\t$0\n}).isRequired,", |
300 | 300 | "description": "An object taking on a particular shape required" |
| 301 | + }, |
| 302 | + "getSnapshotBeforeUpdate": { |
| 303 | + "prefix": "gsbu", |
| 304 | + "body": "getSnapshotBeforeUpdate(prevProps, prevState) {\n\t$0\n}\n", |
| 305 | + "description": "Invoked right before the most recently rendered output is committed to e.g. the DOM. It enables your component to capture current values" |
| 306 | + }, |
| 307 | + "getDerivedStateFromProps": { |
| 308 | + "prefix": "gdsfp", |
| 309 | + "body": "static getDerivedStateFromProps(nextProps, prevState) {\n\t$0\n}\n", |
| 310 | + "description": "Invoked after a component is instantiated as well as when it receives new props." |
| 311 | + }, |
| 312 | + "componentDidCatch": { |
| 313 | + "prefix": "cdc", |
| 314 | + "body": "componentDidCatch(error, info) {\n\t$0\n}\n", |
| 315 | + "description": "Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them." |
301 | 316 | } |
302 | 317 | } |
0 commit comments