Merge() from lodash causes warnings in Immutable.js #8
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MichaelContento/redux-storage#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm using Immutable decorator to load state data with localStorage engine. But on initial load I get a bunch of warnings from Immutable library:
I guess, this is happening, because
merge()function onlodashis used https://github.com/michaelcontento/redux-storage/blob/master/src/reducer.js#L8 whenLOADaction being handled and it uses.lengthsomehow.What we can do with it?
Looks like the issue is still present. Now there are the same warnings but in the context of
myMerge()andmergeDeep():Thank you for reporting this! With the latest change all warnings should be gone :)
Just installed
v1.2.3and I still get the same warnings 😞Strange .. could you provide me with the values of
oldStateandnewStateof themyMergefunction inlib/recuder.js?I use
redux-loggermiddleware in my redux-app and when REDUX_STORAGE_LOAD action is dispatched I see thatoldStateandnewStateare ImmutableJS instances. Two states are successfully merged.Is it possible for you to create a boiled down example that triggers the warning? Preferable by calling the reducer function directly? Here is how it's done in the testsuite:
src/__tests__/reducer-test.jsThe problem for me is, that I honestly don't have any clue at all :( It's currently impossible for me to find a broken combination that triggers those warnings in immutable.
Ok, I, surely, will do it during the week.
@romanenko, any news on this? I'm about to release a new version to npm soon and I'd like to get this one closed too :)
@michaelcontento I'm sorry for the delay — i'm meeting deadlines in my client work projects. I'm using this great library in one of the client projects and I'm still getting this warnings in the console. I started to implement, but couldn't find time to finish, my boiled down example. Wouldn't you mind, I will finish it during this friday?
Ok, no problem and thank you for this feedback.
Running into similar problems but with the async storage. @romanenko did you get a chance to work on an example? I might be able to whip something up
I have just implemented redux-storage in a new project, and got these warnings as I'm using immutable.
Took the time to reproduce the problem https://github.com/Agowan/react-storage-immutable-warnings.
Thank you @Agowan for the example! With this I managed to publish a fixed version (1.3.1) to npm 🚀