Skip to content

Instantly share code, notes, and snippets.

View captain-igloo's full-sized avatar

Colin Doig captain-igloo

  • Wellington, New Zealand
View GitHub Profile
@captain-igloo
captain-igloo / redux-actions.ts
Last active September 17, 2018 23:59 — forked from milankorsos/redux-actions.ts
Correct TypeScript typing example for Redux Thunk actions
// updated for redux 4 and redux-thunk 2.3.0
import {Action, ActionCreator} from 'redux'; // 4.0.0
import {ThunkAction, ThunkDispatch} from 'redux-thunk'; // 2.3.0
// Redux action
const reduxAction: ActionCreator<Action> = (text: string) => ({
type: SET_TEXT,
text
});