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

Lazy load the default adapter to prevent non-browser builds failures #26

Closed mdziekon closed 8 years ago

mdziekon commented 8 years ago

Solves problem with localStorage being undefined in non-browser environments (like node).

Inspired by this comment, but made it as a getter function to prevent code repetition and easier changes to the default value in the future.

willmcclellan commented 8 years ago

@elgerlambert I think this latest commit needs publishing to npm

brabeji commented 8 years ago

@elgerlambert sorry to bump, can you please publish latest version?

elgerlambert commented 8 years ago

Sorry guys, started a new job, needed to find my bearings. I'll try to get on it this weekend!