A collection of Sublime Text snippets for react-native.
Install via Package Control by searching for react-native-snippets
.
Snippet | Tab Trigger |
---|---|
Create React Native Class | rncc |
this.setState() | tss |
Create StyleSheet | css |
StyleSheet.create() | ssc |
React.PropTypes. | rpt |
Snippet | Tab Trigger |
---|---|
componentWillMount() | cwm |
componentDidMount() | cdm |
componentWillUnMount() | cwum |
componentDidUnMount() | cdum |
componentWillUpdate() | cwud |
componentDidUpdate() | cdud |
componentWillReceiveProps() | cwrp |
shouldComponentUpdate() | scud |
propTypes: | pt |
Snippet | Tab Trigger |
---|---|
ActivityIndicatorIOS | ActivityIndicatorIOS |
DatePickerIOS | DatePickerIOS |
Image | Image |
ListView | ListView |
NavigatorIOS | NavigatorIOS |
PickerIOS | PickerIOS |
View | View_ |
Some snippets heavily inspired by sublime-react.
- Flow Type Checking Annotations
- Create your snippet.
- Postfix your snippets with
_react_native
. - Add them to the README
- Submit a Pull Request
- ???
- Profit!
Try to make your snippet tab triggers follow a syllable-based fuzzy-search style. For example for componentWillUpdate()
, cwud
is preferred over cwup
.