Skip to content
This repository has been archived by the owner on Jan 5, 2018. It is now read-only.

Commit

Permalink
Update snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
TimonVS committed Jul 23, 2016
1 parent 347d3c6 commit b942e69
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions snippets/snippets.json
Expand Up @@ -19,7 +19,7 @@

"reactClassCompomentWithMethods": {
"prefix": "rcfc",
"body": "import React, {Component, PropTypes} from 'react'\n\nclass ${1:componentName} extends Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\n\t}\n\n\tcomponentWillMount() {\n\n\t}\n\n\tcomponentDidMount() {\n\n\t}\n\n\tcomponentWillReceiveProps(nextProps) {\n\n\t}\n\n\tshouldComponentUpdate(nextProps, nextState) {\n\n\t}\n\n\tcomponentWillUpdate(nextProps, nextState) {\n\n\t}\n\n\tcomponentDidUpdate(prevProps, prevState) {\n\n\t}\n\n\tcomponentWillUnmount() {\n\n\t}\n\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n${1:componentName}.propTypes = {\n\n}\n\nexport default ${1:componentName}",
"body": "import React, {Component, PropTypes} from 'react'\n\nclass ${1:componentName} extends Component {\n\tconstructor (props) {\n\t\tsuper(props)\n\n\t}\n\n\tcomponentWillMount () {\n\n\t}\n\n\tcomponentDidMount () {\n\n\t}\n\n\tcomponentWillReceiveProps (nextProps) {\n\n\t}\n\n\tshouldComponentUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentWillUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentDidUpdate (prevProps, prevState) {\n\n\t}\n\n\tcomponentWillUnmount () {\n\n\t}\n\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n${1:componentName}.propTypes = {\n\n}\n\nexport default ${1:componentName}",
"description": "Creates a React component class with PropTypes and all lifecycle methods and ES6 module system"
},

Expand All @@ -36,12 +36,12 @@

"classConstructor": {
"prefix": "con",
"body": "constructor(props) {\n\tsuper(props)\n\t$0\n}\n",
"body": "constructor (props) {\n\tsuper(props)\n\t$0\n}\n",
"description": "Adds a default constructor for the class that contains props as arguments"
},
"classConstructorContext": {
"prefix": "conc",
"body": "constructor(props, context) {\n\tsuper(props, context)\n\t$0\n}\n",
"body": "constructor (props, context) {\n\tsuper(props, context)\n\t$0\n}\n",
"description": "Adds a default constructor for the class that contains props and context as arguments"
},

Expand All @@ -53,43 +53,43 @@

"componentWillMount": {
"prefix": "cwm",
"body": "\ncomponentWillMount() {\n\t$0\n}\n",
"body": "\ncomponentWillMount () {\n\t$0\n}\n",
"description": "Invoked once, both on the client and server, immediately before the initial rendering occurs"
},

"componentDidMount": {
"prefix": "cdm",
"body": "componentDidMount() {\n\t$0\n}\n",
"body": "componentDidMount () {\n\t$0\n}\n",
"description": "Invoked once, only on the client (not on the server), immediately after the initial rendering occurs."
},

"componentWillReceiveProps": {
"prefix": "cwr",
"body": "componentWillReceiveProps(nextProps) {\n\t$0\n}\n",
"body": "componentWillReceiveProps (nextProps) {\n\t$0\n}\n",
"description": "Invoked when a component is receiving new props. This method is not called for the initial render."
},

"shouldComponentUpdate": {
"prefix": "scu",
"body": "shouldComponentUpdate(nextProps, nextState) {\n\t$0\n}\n",
"body": "shouldComponentUpdate (nextProps, nextState) {\n\t$0\n}\n",
"description": "Invoked before rendering when new props or state are being received. "
},

"componentWillUpdate": {
"prefix": "cwup",
"body": "componentWillUpdate(nextProps, nextState) {\n\t$0\n}\n",
"body": "componentWillUpdate (nextProps, nextState) {\n\t$0\n}\n",
"description": "Invoked immediately before rendering when new props or state are being received."
},

"componentDidUpdate": {
"prefix": "cdup",
"body": "componentDidUpdate(prevProps, prevState) {\n\t$0\n}\n",
"body": "componentDidUpdate (prevProps, prevState) {\n\t$0\n}\n",
"description": "Invoked immediately after the component's updates are flushed to the DOM."
},

"componentWillUnmount": {
"prefix": "cwun",
"body": "componentWillUnmount() {\n\t$0\n}\n",
"body": "componentWillUnmount () {\n\t$0\n}\n",
"description": "Invoked immediately before a component is unmounted from the DOM."
},

Expand Down

0 comments on commit b942e69

Please sign in to comment.