Skip to content

Instantly share code, notes, and snippets.

View dderg's full-sized avatar

Danila Dergachev dderg

  • Derg AB
  • Stockholm, Sweden
View GitHub Profile
@milankorsos
milankorsos / redux-actions.ts
Last active November 10, 2022 10:58
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
};
};