@@ -202,22 +202,25 @@ Store enhancer that can debounce subscription notifications
202202
203203` ` ` js
204204const debounceNotify = _ .debounce (notify => notify ())
205- const store = configureStore ({ reducer, enhancers: [ batchedSubscribe (debounceNotify) ] })
205+ const store = configureStore ({
206+ reducer,
207+ enhancers: [batchedSubscribe (debounceNotify)]
208+ })
206209` ` `
207210
208211**[manaflair/redux-batch](https://github.com/manaflair/redux-batch)** <br />
209212Store enhancer that allows dispatching arrays of actions
210213
211214` ` ` js
212- const store = configureStore ({ reducer, enhancers: [ reduxBatch ] })
215+ const store = configureStore ({ reducer, enhancers: [reduxBatch] })
213216store .dispatch ([{ type: ' INCREMENT' }, { type: ' INCREMENT' }])
214217` ` `
215218
216219**[laysent/redux-batch-actions-enhancer](https://github.com/laysent/redux-batch-actions-enhancer)** <br />
217220Store enhancer that accepts batched actions
218221
219222` ` ` js
220- const store = configureStore ({ reducer, enhancers: [ batch ().enhancer ] })
223+ const store = configureStore ({ reducer, enhancers: [batch ().enhancer ] })
221224store .dispatch (createAction ({ type: ' INCREMENT' }, { type: ' INCREMENT' }))
222225` ` `
223226
@@ -239,12 +242,12 @@ const persistConfig = { key: 'root', version: 1, storage }
239242const persistedReducer = persistReducer (persistConfig, rootReducer)
240243export const store = configureStore ({
241244 reducer: persistedReducer,
242- middleware : ( getDefaultMiddleware ) =>
245+ middleware : getDefaultMiddleware =>
243246 getDefaultMiddleware ({
244247 serializableCheck: {
245- ignoredActions: [FLUSH , REHYDRATE , PAUSE , PERSIST , PURGE , REGISTER ],
246- },
247- }),
248+ ignoredActions: [FLUSH , REHYDRATE , PAUSE , PERSIST , PURGE , REGISTER ]
249+ }
250+ })
248251})
249252export const persistor = persistStore (store)
250253` ` `
@@ -256,17 +259,18 @@ Persistence layer for Redux with flexible backends
256259const reducer = storage .reducer (combineReducers (reducers))
257260const engine = createEngineLocalStorage (' my-save-key' )
258261const storageMiddleware = storage .createMiddleware (engine)
259- const store = configureStore ({
260- reducer,
261- middleware : getDefaultMiddleware => getDefaultMiddleware .concat (storageMiddleware)
262+ const store = configureStore ({
263+ reducer,
264+ middleware : getDefaultMiddleware =>
265+ getDefaultMiddleware .concat (storageMiddleware)
262266})
263267` ` `
264268
265269**[redux-offline/redux-offline](https://github.com/redux-offline/redux-offline)** <br />
266270Persistent store for Offline-First apps, with support for optimistic UIs
267271
268272` ` ` js
269- const store = configureStore ({ reducer, enhancer: [ offline (offlineConfig) ] })
273+ const store = configureStore ({ reducer, enhancer: [offline (offlineConfig)] })
270274store .dispatch ({
271275 type: ' FOLLOW_USER_REQUEST' ,
272276 meta: { offline: { effect: {}, commit: {}, rollback: {} } }
@@ -328,7 +332,7 @@ listenerMiddleware.startListening({
328332 const { specialData } = action .meta
329333
330334 analyticsApi .trackUsage (action .type , user, specialData)
331- },
335+ }
332336})
333337` ` `
334338
@@ -501,9 +505,10 @@ const fetchUsers = () => ({
501505An opinionated connector between socket.io and redux.
502506
503507` ` ` js
504- const store = configureStore ({
505- reducer,
506- middleware : getDefaultMiddleware => getDefaultMiddleware .concat (socketIoMiddleware)
508+ const store = configureStore ({
509+ reducer,
510+ middleware : getDefaultMiddleware =>
511+ getDefaultMiddleware .concat (socketIoMiddleware)
507512})
508513store .dispatch ({ type: ' server/hello' , data: ' Hello!' })
509514` ` `
0 commit comments