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

persistStateMiddleware returns action #27

Closed 4ega closed 8 years ago

4ega commented 8 years ago

Hi I have an issue in my app with persistStateMiddleware.

https://github.com/elgerlambert/redux-localstorage/blob/1.0-breaking-changes/src/persistStateMiddleware.js#L10-L18

I have some logic based on value that is returned from my middleware chain, but persistStateMiddleware brakes it because it returns action, instead of return next(action);. Is there a reason of returning action? Maybe persistStateMiddleware can return result of next instead of action?

elgerlambert commented 8 years ago

Hi @4ega,

This has been fixed by #34 (and is available on npm)