I now get errors in my project in redux-actions:
This parameter is incompatible:
30: declare export type Reducer<S, A> = (state: S | void, action: A) => S;
^^^^^^^^ undefined. This type is incompatible with. See lib: flow-typed/npm/redux_v3.x.x.js:30
58: }, defaultState)
^^^^^^^^^^^^ object literal. See: app/reducers/appointmentsDurations.js:58
After digging into it, I believe it's due to #1958. The state's type in the reducer in redux is now S | void, but in redux-actions, it's still just S. So redux-action returns a different type of reducer to createStore and breaks there I believe.
Thanks for reporting this issue, would you be up to write a fix for redux-actions?
I tried to fix this, but got issues trying to fix the tests and didn't have much time. I can give it another go soon. Since redux-actions has to work with redux, I was wondering why redux-actions re-defines a type like Reducer instead of importing the one from the redux libdef?
I was wondering why redux-actions re-defines a type like Reducer instead of importing the one from the redux libdef
Flow-typed doesn't yet have the ability to import definitions for other libdefs, although it is set as a target for version 3.0.0.
Most helpful comment
Flow-typed doesn't yet have the ability to import definitions for other libdefs, although it is set as a target for version
3.0.0.