No more writing React components from scratch
Convenient snippets for the Atom text editor are provided! :)
Copy the contents of the file snippets/react.cson to your Atom snippets.cson file that is located in ~/.atom/snippets.cson
.
Abbreviation | Description |
---|---|
rc | React Component |
rsfc | React Stateless Functional Component |
rdc | Redux Component |
rduc | Redux Reducer |
ac | Action Creator |
act | Action Creator with Redux Thunk |
aca | Action Creator with Axios |
rdf | Redux Form (v6) |
ect | Enzyme Component Test |
rdu3 | Redux Reducer Three Cases (LOADING, SUCCESS, FAILURE) |
d3ac | Define and Export Three Action Types |
i3ac | Import Three Action Types |
Snippets for Sublime Text are also available!
Copy all the files inside the sublime-snippets/ directory into your own snippets directory. For Mac users, that would be ~/Users/$USER/Library/Application\ Support/Sublime\ Text\ 3/Packages/User
.
cp sublime-snippets/* ~/Users/$USER/Library/Application\ Support/Sublime\ Text\ 3/Packages/User
See the table in the previous section for a listing of all the snippets available.