elgerlambert / redux-localstorage

Store enhancer that syncs (a subset) of your Redux store state to localstorage.
MIT License
1.32k stars 107 forks source link

ATTN: the maintainer of this has gone silent; try redux-persist instead #94

Open rekmarks opened 6 years ago

rekmarks commented 6 years ago

https://github.com/rt2zz/redux-persist https://www.npmjs.com/package/redux-persist

Thanks to: @ptytb

marcioaso commented 5 years ago

I have lots of multi-level redux states to keep and batching enabled in my projects. I'm talking about 150 to 200 views to keep so besides divide into multiple keys, they interact with each other and the multi-level helps the datasource to be kept organized. A flat structure would be very messy and very "MVP'ed" so... no. In conclusion, it's very painful to maintain but very worthy.

Instead of do lots of workarounds to implement redux-persist (which I abandoned), I've found this solution (of this component) a lot more logic: persistence kept by a middleware. Isn't it? You don't even need a specific component to serve as provider, like redux-persist is currently using.

Maybe you are not satisfied with the features of the project, but why don't you fork it and do a repo to fit your needs? I bet my juniors can do it with THIS component simplicity. Because this component is perfect for it's simplicity (again), it's number of code lines (which is important in ANY project) and it's flexibility. It's simple enough - in my opinion - to not even actually NEED a maintainer, did you take a look at the source? This component also have the right mindset, because a storage producers doesn't have much to do with a render components anyway, like redux-persist thinks. It's DATA fgs. So THIS component answer a very simple question.

Why data persistence needs a rendering component? It doesn't.

Redux... I understand. It has to inject the enhancement, but why does redux-persist? THIS component makes this CLEAR statement. Redux-persist, compared to this, seems like an overly-engineered mamute with lot of code done to produce an unnecessary feature, slowing the whole chain of processes. If a project need 2 mil lines of code to run, the difference of amount of lines of code I run is critical.

About the maintainer, I'm very thankful to him for his work. I hope he is in a very interesting, worthy and busy job. This component is a very simple, brilliant work. He doesn't work for me, so I will use his code and hope some day to help him also. And finally, about the redux-persist... thanks, but no thanks.