Skip to content

Latest commit

 

History

History
135 lines (120 loc) · 3.02 KB

README.md

File metadata and controls

135 lines (120 loc) · 3.02 KB

react-native-snippets

A collection of Sublime Text snippets for react-native.

Install

Install via Package Control by searching for react-native-snippets.

Snippets

Snippet Tab Trigger
Create React Native Class rncc
this.setState() tss
Create StyleSheet css
StyleSheet.create() ssc
React.PropTypes. rpt

Lifecycle Methods

Snippet Tab Trigger
componentWillMount() cwm
componentDidMount() cdm
componentWillUnMount() cwum
componentDidUnMount() cdum
componentWillUpdate() cwud
componentDidUpdate() cdud
componentWillReceiveProps() cwrp
shouldComponentUpdate() scud
propTypes: pt

Components

Snippet Tab Trigger
ActivityIndicatorIOS ActivityIndicatorIOS
DatePickerIOS DatePickerIOS
Image Image
ListView ListView
NavigatorIOS NavigatorIOS
PickerIOS PickerIOS
View View_

Some snippets heavily inspired by sublime-react.

TODO

  • Flow Type Checking Annotations

Contributing

  1. Create your snippet.
  2. Postfix your snippets with _react_native.
  3. Add them to the README
  4. Submit a Pull Request
  5. ???
  6. Profit!

Try to make your snippet tab triggers follow a syllable-based fuzzy-search style. For example for componentWillUpdate(), cwud is preferred over cwup.