re: Add Offline-Caching to Your React Reducer with 5 Lines of Code VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Cool, why not cover those cases and write a hook to manage them? const useCachedReducer = ( reducer, initialState, storeKey, serializer ...

Thanks for taking the time to write that !

The main reason I didn't go into it, is to keep the code under 5 lines 😅

I wanted the reader to quickly understand the idea of using HOFs with the reducer and build on it and experiment themselves.

Now they can also read/use this hook 👌

code of conduct - report abuse