redux-leaves icon indicating copy to clipboard operation
redux-leaves copied to clipboard

useReducer example not working with latest version

Open CarlMungazi opened this issue 4 years ago • 3 comments

This example does not seem to be working with the following package versions:

    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-scripts": "3.2.0",
    "redux-leaves": "^2.0.0"

I was trying to follow this example and I was getting the following error:

Screenshot 2020-09-16 at 00 50 10

I thought I was doing something wrong but when I updated the example to match my versions, the same error appeared. I don't understand this lib enough to know what the issue could be, so any insight would be useful!

CarlMungazi avatar Sep 15 '20 23:09 CarlMungazi

same thing for me , did you resolve the issue ?

arezki1990 avatar Sep 18 '20 10:09 arezki1990

I bumped my version down to 0.7.4 and used that instead. It's a short-term fix until @richardcrng is able to shed more light.

CarlMungazi avatar Sep 18 '20 14:09 CarlMungazi

Thanks for using and flagging, @CarlMungazi and @arezki1990!

I'm in the process of deprecating Redux-Leaves in favour of Riduce (also created by me) - it's essentially the same library (shared API and a common git history), but with significant refactoring for stronger TypeScript support and a new name to de-emphasise Redux (since it should be usable with useReducer).

I haven't investigated why this useReducer example didn't work with the latest version of Redux-Leaves, but it works for me with Riduce (sandbox here).

So, as a fix for now, can you swap out redux-leaves for riduce?

(At some point, I might patch Redux-Leaves, but I don't intend to support it long-term)

richardcrng avatar Sep 18 '20 16:09 richardcrng