Skip to content

Instantly share code, notes, and snippets.

@aigoncharov
Last active January 9, 2019 13:17
Show Gist options
  • Save aigoncharov/46660b68e019f1269e821655e486fa9d to your computer and use it in GitHub Desktop.
Save aigoncharov/46660b68e019f1269e821655e486fa9d to your computer and use it in GitHub Desktop.
class CatsGetInit {
get static type () {
return `prefix/${this.name}`
}
constructor () {
this.type = this.constructor.type
}
}
const reducerCats = (state, action) => {
switch (action.type) {
case CatsGetInit.type:
return {
...state,
loading: true,
}
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment