Created
July 20, 2018 12:02
-
-
Save andrewsantarin/519c680ebe73a59bcdb5a78d1d63b995 to your computer and use it in GitHub Desktop.
Snippet: React: Stateless Functional Component With Fragment
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, { Fragment } 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:Fragment}></${2:Fragment}> | |
); | |
} | |
${1:${TM_FILENAME/(.?\w*)(?:\.\w+)*$/$1/g}}.propTypes = PROP_TYPES; | |
${1:${TM_FILENAME/(.?\w*)(?:\.\w+)*$/$1/g}}.defaultProps = DEFAULT_PROPS; | |
]]></content> | |
<tabTrigger>rsfc-frag</tabTrigger> | |
<scope>source.js</scope> | |
<description>React: Stateless Functional Component With Fragment</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment