atom-herxlabs-react-snippets
A useful collection of React and React-Native snippets in ES6 for Atom
Install
Using apm:
apm install atom-herxlabs-react-snippets
Or search for atom-herxlabs-react-snippets in Atom settings view.
Available snippets 🚀
To Start
| Prefix | Snippet |
|---|---|
| xInit | App Base |
| xInitc | Component Base |
Lifecycle
| Prefix | Snippet |
|---|---|
| xConstructor | constructor() |
| xCWM | componentWillMount() |
| xCDM | componentDidMount() |
| xCWRP | componentWillReceiveProps() |
| xSCU | shouldComponentUpdate() |
| xCWU | componentWillUpdate() |
| xCDU | componentDidUpdate() |
| xCWUM | componentWillUnMount() |
State and props
| Prefix | Snippet |
|---|---|
| xsetState | Create a setState() arrow function |
| xState | this.state. |
| xdefaultProps | To set default props to a component |
| xProps | this.props. |
Styles
| Prefix | Snippet |
|---|---|
| xStyleSheet | Create an StyleSheet |
| xStyle | Create an Style |
| xStyleAsign | Asign an Style |
Misc
| Prefix | Snippet |
|---|---|
| xFirebase | Create Firebase imports and config |
License
This work is licensed under the The MIT License.
Donate
You are welcome support this project via Paypal.