Last active
August 19, 2017 21:10
-
-
Save dgowrie/f6d5957e4835e1bb801a30d51a5d80c7 to your computer and use it in GitHub Desktop.
Sublime Text Snippet: react_component_stateless.sublime-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'; | |
| import PropTypes from 'prop-types'; | |
| const propTypes = { | |
| }; | |
| function ${1:${TM_FILENAME/(.+)\..+|.*/$1/:ComponentName}}(${2:props}) { | |
| return ( | |
| ${3:<div>${0}</div>} | |
| ); | |
| } | |
| ${1:${TM_FILENAME/(.+)\..+|.*/$1/:ComponentName}}.propTypes = propTypes; | |
| export default ${1:${TM_FILENAME/(.+)\..+|.*/$1/:ComponentName}}; | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>react-sfc</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <scope>source.js</scope> | |
| <description>React: stateless functional component</description> | |
| </snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment