Created
July 20, 2018 12:01
-
-
Save andrewsantarin/a13ae42dc9a0acfd1651ba2514f5e801 to your computer and use it in GitHub Desktop.
Snippet: React: Stateless Functional Component
This file contains 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'; | |
export const PROP_TYPES = { | |
}; | |
export const DEFAULT_PROPS = { | |
}; | |
export default function ${1:${TM_FILENAME/(.?\w*)(?:\.\w+)*$/$1/g}}(props) { | |
return ( | |
<${2:div}></${2:div}> | |
); | |
} | |
${1:${TM_FILENAME/(.?\w*)(?:\.\w+)*$/$1/g}}.propTypes = PROP_TYPES; | |
${1:${TM_FILENAME/(.?\w*)(?:\.\w+)*$/$1/g}}.defaultProps = DEFAULT_PROPS; | |
]]></content> | |
<tabTrigger>rsfc</tabTrigger> | |
<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