Thunk middleware for Redux.NET
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
redux.NET-thunk.AndroidExample Formatting Jan 15, 2016
redux.NET-thunk Added nuspec Jan 11, 2016
LICENSE Added nuspec Jan 11, 2016 Added readme Jan 15, 2016
redux.NET-thunk.sln Added example project Jan 15, 2016


This is an implementation of the Redux thunk middleware for use with the Redux.NET library.



Install directly from the NuGet package, or from the Package Manager Console by running:

Install-Package redux.NET-thunk

Apply the middleware by passing it as a parameter to the Store constructor:

var store = new Store<State>(initialState, reducer, Taiste.Redux.Middleware.ThunkMiddleware);


Thunk middleware can be used to create Redux actions that dispatch other actions for conditional or asynchronous dispatching.

Example conditional dispatch:

public static IAction ConditionalIncrement ()
    return new ThunkAction<int> ((dispatch, getState) => {
        int state = getState ();

        if (state < 10) {
            dispatch(new IncrementAction());



Asynchronous dispatch:

public static IAction AsyncActionCreator ()
    return new ThunkAction<ApplicationState> ((dispatch, getState) => {
        Task.Factory.StartNew (() => {
            var result = expensiveOperation ();
            dispatch (new ResultAction (result));




Unlike the Javascript version, this version of the middleware considers Dispatch to be a void action, i.e. no Promise or similar is returned from Dispatch. The dispatched ThunkAction is returned to satisfy the interface.