Created
April 18, 2016 20:38
-
-
Save Ellisande/34186b14c885450b9fa086eda427590e to your computer and use it in GitHub Desktop.
React/Redux Atom Snippets
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
'.source.jsx': | |
'react-component': | |
'prefix': 'component' | |
'body': """ | |
import React, {Component} from 'react'; | |
class $1 extends Component { | |
constructor(props){ | |
super(props) | |
} | |
render(){ | |
return (<div className='$2'>$3</div>); | |
} | |
} | |
export default $1;""" | |
'redux-component': | |
'prefix': 'redux' | |
'body': ''' | |
import React, {Component} from 'react'; | |
import {connect} from 'react-redux'; | |
class $1 extends Component { | |
constructor(props){ | |
super(props) | |
} | |
render(){ | |
return (<div className='$2'>$3</div>); | |
} | |
} | |
export default connect(i=>i)($1);''' | |
'div': | |
'prefix': 'div' | |
'body': """ | |
<div className='$1'> | |
$2 | |
</div>""" | |
'label': | |
'prefix': 'label' | |
'body': "<label forName='$1'>$2</label>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment