Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh
Created January 27, 2020 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OliverJAsh/bc3bd3621d3a90abbd9f7ee8b42dedef to your computer and use it in GitHub Desktop.
Save OliverJAsh/bc3bd3621d3a90abbd9f7ee8b42dedef to your computer and use it in GitHub Desktop.
+import { batchedSubscribe } from "redux-batched-subscribe";
+import { debounce } from "lodash";
export const store = createStore(
reducer,
+ batchedSubscribe(
+ debounce(notify => {
+ notify();
+ })
+ )
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment