perf: debounce localStorage save

This commit is contained in:
Moody Salem 2021-05-14 07:10:25 -05:00
parent af6098bfe5
commit 7d71af353e
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB

@ -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 }),
})