Skip to content

Prefer es6 syntax for life cycle methods. #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,41 +474,41 @@
},
"componentWillMount": {
"prefix": "cwm",
"body": ["componentWillMount = () => {", " $0", "}", ""],
"body": ["componentWillMount() {", " $0", "}", ""],
"description":
"DEPRECATED!!!. Invoked once, both on the client and server, immediately before the initial rendering occurs"
},
"componentDidMount": {
"prefix": "cdm",
"body": ["componentDidMount = () => {", " $0", "}", ""],
"body": ["componentDidMount() {", " $0", "}", ""],
"description":
"Invoked once, only on the client (not on the server), immediately after the initial rendering occurs."
},
"componentWillReceiveProps": {
"prefix": "cwr",
"body": ["componentWillReceiveProps = (nextProps) => {", " $0", "}", ""],
"body": ["componentWillReceiveProps(nextProps) {", " $0", "}", ""],
"description":
"DEPRECATED!!!. Invoked when a component is receiving new props. This method is not called for the initial render."
},
"shouldComponentUpdate": {
"prefix": "scu",
"body": ["shouldComponentUpdate = (nextProps, nextState) => {", " $0", "}", ""],
"body": ["shouldComponentUpdate(nextProps, nextState) {", " $0", "}", ""],
"description": "Invoked before rendering when new props or state are being received. "
},
"componentWillUpdate": {
"prefix": "cwup",
"body": ["componentWillUpdate = (nextProps, nextState) => {", " $0", "}", ""],
"body": ["componentWillUpdate(nextProps, nextState) {", " $0", "}", ""],
"description":
"DEPRECATED!!!. Invoked immediately before rendering when new props or state are being received."
},
"componentDidUpdate": {
"prefix": "cdup",
"body": ["componentDidUpdate = (prevProps, prevState) => {", " $0", "}", ""],
"body": ["componentDidUpdate(prevProps, prevState) {", " $0", "}", ""],
"description": "Invoked immediately after the component's updates are flushed to the DOM."
},
"componentWillUnmount": {
"prefix": "cwun",
"body": ["componentWillUnmount = () => {", " $0", "}", ""],
"body": ["componentWillUnmount() {", " $0", "}", ""],
"description": "Invoked immediately before a component is unmounted from the DOM."
},
"getDerivedStateFromProps": {
Expand All @@ -519,7 +519,7 @@
},
"getSnapshotBeforeUpdate": {
"prefix": "gsbu",
"body": ["getSnapshotBeforeUpdate = (prevProps, prevState) => {", " $0", "}", ""],
"body": ["getSnapshotBeforeUpdate(prevProps, prevState) {", " $0", "}", ""],
"description": "Called right before mutations are made (e.g. before the DOM is updated)"
},
"componentRender": {
Expand Down