A collection of React Native related snippets
Snippet | Description |
---|---|
tss |
Set the state of this component |
cl |
Log output to console |
imr |
Import React module |
ed |
Export default from module |
cdm |
componentDidMount lifecycle method |
cwm |
componentWillMount lifecycle method |
cwrp |
ComponentWillReceiveProps lifecycle method |
cwum |
componentWillUnmount lifecycle method |
scu |
shouldComponentUpdate lifecycle method |
cwu |
ComponentWillUpdate lifecycle method |
cdu |
ComponentDidUpdate lifecycle method |
cc |
Create React container(class) component |
sfc |
Create React stateless functional component |
tfu |
Force render to be called on component |
defaultProps |
Set the default props for a component |
propTypes |
Set the propTypes for component |
ssc |
Create a Stylesheet |
flex |
Flex style property |
jc |
Justify content style property |
ai |
Align items style property |
rnImage |
Create React Native Image Component |
rnScrollView |
Create React Native ScrollView Component |
rnText |
Create React Native Text Component |
rnTouchableH |
Create React Native TouchableHighlight Component |
rnView |
Create React Native View Component |
Contributions are welcome!
- Fork it.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or open up a issue.
Licensed under the MIT License.