Skip to content

Instantly share code, notes, and snippets.

@milankorsos
milankorsos / redux-actions.ts
Last active January 10, 2025 19:22
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
};
};