Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Support reducer state #11
So im not really sure why the test case is constructed as such when you are trying to test the reducing state reading.
I think you probably copied the map state reading test, which wont work because map states are stored very differently from reducing states.
Thanks, that's exactly the kind of insight that I was looking for! I realize now that it makes sense to try reading the reducing state with a ValueStateReader. The fact that my reduced value happens to be a map has nothing to do with an actual MapState.
@gyfora thanks, I added commit.
Now the test successfully reads reducer state of
Running the test prints:
Which is correct, because keyBy is by key only => it should:
If you have any further suggestions as I start to clean this up (and try to use this for my actual use case with a rather big state), please let me know!