Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

React template not working #1086

@theCuriousOne

Description

@theCuriousOne

When you run the template ReactReduxSpa with dotnet run it will load up perfectly.
But when you delete the server and the client "dist" folders an typescript error will be shown in configureStore.ts (typescript version 2.3.4) which can be circumvented if you do this:

const createStoreWithMiddleware = compose( applyMiddleware(thunk, routerMiddleware(history)) )(createStore);

And if you upgrade the typescript to version 2.4.1 (latest at the moment) there will be another error:

TS2322: Type '(state: WeatherForecastsState, action: KnownAction) => WeatherForecastsState' is not assignable to type 'Reducer<WeatherForecastsState>'.

      Types of parameters 'action' and 'action' are incompatible.

        Type 'A' is not assignable to type 'KnownAction'.

          Type 'Action' is not assignable to type 'KnownAction'.

            Type 'Action' is not assignable to type 'RequestWeatherForecastsAction'.

              Property 'startDateIndex' is missing in type 'Action'.

                Type 'A' is not assignable to type 'ReceiveWeatherForecastsAction'.

                  Type 'Action' is not assignable to type 'ReceiveWeatherForecastsAction'.

                    Property 'startDateIndex' is missing in type 'Action'.

(still looking for a workaround on this one)
So.... the template is not working as expected :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions