alrighty-snippets package
React ES6 snippets for Atom.
Snippets
New component
Prefix: _rnc
; 1:MyComponent extends Component static propTypes = ; { return $2:<div>MyComponent</div> ; }
New Stateless component
Prefix: _rns
; const $1:MyComponent = { return $2:<div>MyComponent</div> ;} $3:MyComponentpropTypes =
Lifecycle Methods
Prefix: _rcwm
{ $1}
Prefix: _rcdm
{ $1}
Prefix: _rcwu
{ $1}
PropTypes
String
Prefix: _rps
$1:myProp: PropTypesstring
Prefix: _rpsr
$1:myProp: PropTypesstringisRequired
Number
Prefix: _rpn
$1:myProp: PropTypesnumber
Prefix: _rpnr
$1:myProp: PropTypesnumberisRequired
Object
Prefix: _rpo
$1:myProp: PropTypesobject
Prefix: _rpor
$1:myProp: PropTypesobjectisRequired
Array
Prefix: _rpa
$1:myProp: PropTypesarray
Prefix: _rpar
$1:myProp: PropTypesarrayisRequired
Bool
Prefix: _rpb
$1:myProp: PropTypesbool
Prefix: _rpbr
$1:myProp: PropTypesboolisRequired
Element
Prefix: _rpe
$1:myProp: PropTypeselement
Prefix: _rper
$1:myProp: PropTypeselementisRequired
Function
Prefix: _rpf
$1:myProp: PropTypesfunc
Prefix: _rpfr
$1:myProp: PropTypesfuncisRequired