Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ For Atom, search for `react-native-snippets-horse` in the [Atom Package Manager]
<td>export default</td>
<td>ed</td>
</tr>
<tr>
<td>export const</td>
<td>es</td>
</tr>
</table>

### Lifecycle Methods
Expand Down Expand Up @@ -95,6 +99,11 @@ For Atom, search for `react-native-snippets-horse` in the [Atom Package Manager]
<td>shouldComponentUpdate()</td>
<td>scud</td>
</tr>
<tr>
<td>mapStateToProps()</td>
<td>mstp</td>
<td>Scaffolds a mapStateToProps function.</td>
</tr>
<tr>
<td>static propTypes = {}</td>
<td>propTypes</td>
Expand Down
6 changes: 6 additions & 0 deletions snippets/exportConst_react_native.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[export const ${1}]]></content>
<tabTrigger>es</tabTrigger>
<scope>source.js,source.jsx</scope>
<description>export const</description>
</snippet>
15 changes: 15 additions & 0 deletions snippets/mapStateToProps_react_native.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<snippet>
<content><![CDATA[mapStateToProps = (${1:state}) => {
const { ${3} } = ${2:state.};

return { ${4} };
}]]>

</content>
<content><![CDATA[componentWillMount() {
${1}
}]]></content>
<tabTrigger>mstp</tabTrigger>
<scope>source.js,source.jsx</scope>
<description>mapStateToProps()</description>
</snippet>