Skip to content

Instantly share code, notes, and snippets.

View chunsli's full-sized avatar

Matt Li chunsli

  • Branch8
  • Hong Kong
View GitHub Profile
@chunsli
chunsli / redux-actions.ts
Created January 28, 2018 16:12 — forked from milankorsos/redux-actions.ts
Correct TypeScript typing example for Redux Thunk actions
import {Action, ActionCreator, Dispatch} from 'redux';
import {ThunkAction} from 'redux-thunk';
// Redux action
const reduxAction: ActionCreator<Action> = (text: string) => {
return {
type: SET_TEXT,
text
};
};