Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Shrugs/react-native-snippets
:pencil2: A collection of React Native snippets for Sublime Text and Atom
https://github.com/Shrugs/react-native-snippets
atom react-native snippets sublime-text
Last synced: 6 days ago
JSON representation
:pencil2: A collection of React Native snippets for Sublime Text and Atom
- Host: GitHub
- URL: https://github.com/Shrugs/react-native-snippets
- Owner: shrugs
- License: mit
- Created: 2015-03-28T04:35:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-02T05:59:30.000Z (over 6 years ago)
- Last Synced: 2024-08-16T19:53:01.012Z (4 months ago)
- Topics: atom, react-native, snippets, sublime-text
- Language: Makefile
- Homepage:
- Size: 44.9 KB
- Stars: 256
- Watchers: 13
- Forks: 48
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-snippets ★249 - A collection of Sublime Text Snippets for react-native (Utilities / Other Platforms)
- awesome-react-native - react-native-snippets ★249 - A collection of Sublime Text Snippets for react-native (Utilities / Other Platforms)
- awesome-react-native - react-native-snippets ★249 - A collection of Sublime Text Snippets for react-native (Utilities / Other Platforms)
- awesome-react-native - react-native-snippets ★249 - A collection of Sublime Text Snippets for react-native (Utilities / Other Platforms)
- awesome-react-native-ui - react-native-snippets ★173 - A collection of Sublime Text Snippets for react-native (Utilities / Other Platforms)
README
# [Looking for Maintainer] react-native-snippets
A collection of [React Native](https://github.com/facebook/react-native) snippets for Sublime Text and Atom.
**These snippets use ES6/7 syntax.**
## Install
Install by searching for `react-native-snippets` in [Package Control](http://wbond.net/sublime_packages/package_control)
For Atom, search for `react-native-snippets-horse` in the [Atom Package Manager](https://github.com/atom/apm).
## Snippets
Snippet
Tab Trigger
Description
React Native Create Class
rncc
Scaffolds a full react-native component class.
React Native Create Stateless Function
rnstf
Scaffolds a stateless function.
this.setState()
tss
Create StyleSheet
css
Scaffolds a StyleSheet-only module.
StyleSheet.create()
ssc
Shortcut for creating a StyleSheet inline.
React.PropTypes.
rpt
export default
ed
### Lifecycle Methods
Snippet
Tab Trigger
constructor()
constructor()
componentWillMount()
cwm
componentDidMount()
cdm
componentWillUnMount()
cwum
componentDidUnMount()
cdum
componentWillUpdate()
cwud
componentDidUpdate()
cdud
componentWillReceiveProps()
cwrp
shouldComponentUpdate()
scud
static propTypes = {}
propTypes
static defaultProps = {}
defaultProps
flex: 1
f1
alignItems: 'center'
ai
justifyContent: 'center'
jc
### Components
Snippet
Tab Trigger
ActivityIndicatorIOS
rnActivityIndicatorIOS
DatePickerIOS
rnDatePickerIOS
Image
rnImage
ListView
rnListView
Navigator
rnNavigator
NavigatorIOS
rnNavigatorIOS
PickerIOS
rnPickerIOS
Text
rnText
TouchableHighlight
rnTouchableHighlight
View
rnView
Some snippets heavily inspired by [sublime-react](https://github.com/reactjs/sublime-react).
## TODO
- Flow Type Checking Annotations
## Contributing
1. Create your snippet.
2. Postfix your snippets with `_react_native`.
3. Generate the Atom snippet file (`make install && make atom`)
4. Add them to the README
5. Submit a Pull Request
6. ???
7. Profit!Try to make your snippet tab triggers follow a syllable-based fuzzy-search style. For example for `componentWillUpdate()`, `cwud` is preferred over `cwup`.
## LICENSE
MIT, see `LICENSE`