Snippets in JSON format specifically to be used on VS Code Editor.
Easy shortcuts to help and expedite your code development.
NOTE: Version 2.x comes with some changes for typescript files!
Command | Description |
---|---|
clog |
A simple console.log(); |
cwarn |
A simple console.warn(); |
cerr |
A simple console.error(); |
scomp |
Stateless component creation |
comp |
React component creation |
rncomp |
React Native component creation |
impvar |
Import an exported variable |
imp |
Import a default exported variable from an absolute library |
impdir |
Import a default exported variable from a directory |
impvardir |
Import a exported variable from a directory |
action |
Simple action creation (returns an object) |
thunk |
Thunk action creation (returns a function) |
reducer |
Simple reducer creation |
duck |
An entire module following the ducks pattern |
cdm |
Lifecycle: ComponentDidMount |
cdu |
Lifecycle: ComponentDidUpdate |
cwun |
Lifecycle: ComponentWillUnmount |
gdsfp |
Lifecycle: static getDerivedStateFromProps |
gsbu |
Lifecycle: getSnapshotBeforeUpdate |
cwm |
(DEPRECATED) Lifecycle: UNSAFE_ComponentWillMount |
cwu |
(DEPRECATED) Lifecycle: UNSAFE_ComponentWillUpdate |
cwrp |
(DEPRECATED) Lifecycle: UNSAFE_ComponentWillReceiveProps |
prp |
PropType Declaration |
prpr |
Required PropType Declaration |
mstp |
Map state to props - A function that returns an object |
mdtp |
Map dispatch to props - A variable that returns an object |
hoc |
Wrapper function, AKA High order component |
hookst |
useState hook creation |
That's it for now
Enjoy!