Skip to content

Instantly share code, notes, and snippets.

@rintran720
rintran720 / redux-actions.ts
Created November 11, 2021 03:13 — 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
};
};

Keybase proof

I hereby claim:

  • I am rintran720 on github.
  • I am rintran720 (https://keybase.io/rintran720) on keybase.
  • I have a public key ASAIOM19aR2KUcBTZMO9sC5e5kwffWcmPGF1smjIM4DncQo

To claim this, I am signing this object: