react-tiny-snippets
Short snippets for React
kamataryo 437 0 0.0.15 MIT GitHub

React Tiny Snippets for Atom

apm

Tiny Snippets of React for Atom editor.

This package autocompletes..

  • Life cycle method names and their declarations
  • static class property names and their declarations

example

// Typing `componentwillreceiveprops` leads...
// $1 is next your cursor position

/**
 * componentWillReceiveProps
 * @param  {object} nextProps React props.
 * @return {void}
 */
componentWillReceiveProps(nextProps) {
  $1
}

Installation

Run the following command:

$ apm install react-tiny-snippets

Alternatively go to Atom > Preferences > Packages and search for react-tiny-snippets.

Development

git clone git@github.com:kamataryo/react-tiny-snippets.git
cd react-tiny-snippets
npm install
npm run build

Contribution

Issues and PRs are welcome.

Release Note

0.0.9

  • Add getDerivedStateFromProps, getSnapshotBeforeUpdate, UNSAFE_componentWillMount, UNSAFE_componentWillUpdate and UNSAFE_componentWillReceiveProps.

0.0.5

  • Fix indent bug for propTypes and defaultProps
  • add componentDidCatch snippet for React v16