Last active
September 24, 2017 18:21
-
-
Save mofas/bca7618760f90ab401a5f9b30b7a506d to your computer and use it in GitHub Desktop.
sublime snippet for react
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
constructor(props) { | |
super(props); | |
this.state = { | |
${1} | |
} | |
} | |
]]></content> | |
<tabTrigger>con</tabTrigger> | |
<scope>source.js meta.class.js -(meta meta)</scope> | |
<description>React: shouldComponentUpdate(np, ns) {…}</description> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[className={cx('${1}')}]]></content> | |
<tabTrigger>cxx</tabTrigger> | |
<scope>source.js</scope> | |
<description>CSS Module bind class name</description> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[getIn(['${1}'])]]></content> | |
<tabTrigger>geti</tabTrigger> | |
<scope>source.js</scope> | |
<description>getIn([''])</description> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[updateIn(['${1}'], ()=>${2})]]></content> | |
<tabTrigger>upi</tabTrigger> | |
<scope>source.js</scope> | |
<description>UpdateIn([''], ()=>v)</description> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
import ${1} from '${2}'; | |
]]></content> | |
<tabTrigger>imf</tabTrigger> | |
<scope>source.js</scope> | |
<description>import ... from '...'</description> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
map(d=>{ | |
return ${1}; | |
}) | |
]]></content> | |
<tabTrigger>mapd</tabTrigger> | |
<scope>source.js</scope> | |
<description>.map(d=>{....})</description> | |
</snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
import React from 'react'; | |
class ${1:ClassName} extends React.PureComponent { | |
${2} | |
render(){ | |
const {props} = this; | |
return ( | |
<div></div> | |
); | |
} | |
} | |
export default ${1:ClassName}; | |
]]></content> | |
<tabTrigger>react</tabTrigger> | |
<scope>source.js</scope> | |
<description>React PureRender Component</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment