Skip to content

Instantly share code, notes, and snippets.

@marceloemanoel
Last active May 1, 2017 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marceloemanoel/f2f00c6139ab73b5247f217aae881283 to your computer and use it in GitHub Desktop.
Save marceloemanoel/f2f00c6139ab73b5247f217aae881283 to your computer and use it in GitHub Desktop.
Redux Action Class
import {Action} from "redux";
export default class SomeAction implements Action {
static type: string = "SOME_ACTION";
get type(): string {
return SomeAction.type;
}
}
...
store.dispatch(new SomeAction());
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment