From 7d71af353e628819a5e971d5254460a23044248b Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Fri, 14 May 2021 07:10:25 -0500 Subject: [PATCH] perf: debounce localStorage save --- src/state/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/index.ts b/src/state/index.ts index 2e833b5d2f..cde1add162 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -28,7 +28,7 @@ const store = configureStore({ multicall, lists, }, - middleware: [...getDefaultMiddleware({ thunk: false }), save({ states: PERSISTED_KEYS })], + middleware: [...getDefaultMiddleware({ thunk: false }), save({ states: PERSISTED_KEYS, debounce: 1000 })], preloadedState: load({ states: PERSISTED_KEYS }), })