Skip to content

Commit

Permalink
Updated React snippets.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeantimex committed Jul 18, 2016
1 parent 2e0c00b commit 8838467
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion React/Class Component With InjectIntl.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ${1:Component} extends Component {
const { formatMessage } = this.props.intl;
return (
${0}
${2}
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion React/Class Component.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ${1:Component} extends Component {
render() {
return (
${0}
${2}
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion React/Component Did Update.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ componentDidUpdate(prevProps, prevState) {
${1}
}
]]></content>
<tabTrigger>rdu</tabTrigger>
<tabTrigger>rcdu</tabTrigger>
</snippet>
2 changes: 1 addition & 1 deletion React/Component Will Update.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ componentWillUpdate(nextProps, nextState) {
${1}
}
]]></content>
<tabTrigger>rwu</tabTrigger>
<tabTrigger>rcwu</tabTrigger>
</snippet>
2 changes: 1 addition & 1 deletion React/Default Props.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ static defaultProps = {
${1:prop}: ${2:value},
};
]]></content>
<tabTrigger>rdp</tabTrigger>
<tabTrigger>rdps</tabTrigger>
</snippet>
2 changes: 1 addition & 1 deletion React/Define Messages.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ const messages = defineMessages({
},
});
]]></content>
<tabTrigger>rdm</tabTrigger>
<tabTrigger>rdms</tabTrigger>
</snippet>
6 changes: 2 additions & 4 deletions React/Functional Component With InjectIntl.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import React, { PropTypes } from 'react';
import { injectIntl, intlShape } from 'react-intl';
const ${1:Component} = ({
intl,
}) => {
const ${1:Component} = ({ intl }) => {
const { formatMessage } = intl;
return (
${0}
${2}
);
};
Expand Down
6 changes: 2 additions & 4 deletions React/Functional Component.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
<content><![CDATA[
import React, { PropTypes } from 'react';
const ${1:Component} = ({
className = '',
}) => {
const ${1:Component} = ({ className }) => {
return (
${0}
${2}
);
};
Expand Down
2 changes: 1 addition & 1 deletion React/New Message.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ${1:message}: {
defaultMessage: '${2:default message}',
description: '${3:description}',
id: '${4:id}',
},
}
]]></content>
<tabTrigger>rnm</tabTrigger>
</snippet>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<content><![CDATA[
${1:prop}: PropTypes.${2:string},
]]></content>
<tabTrigger>rpd</tabTrigger>
<tabTrigger>rnp</tabTrigger>
</snippet>
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ static propTypes = {
${1:prop}: PropTypes.${2:string},
};
]]></content>
<tabTrigger>rspt</tabTrigger>
<tabTrigger>rpts</tabTrigger>
</snippet>

0 comments on commit 8838467

Please sign in to comment.