Skip to content

Commit b3d7e55

Browse files
phryneashimanshiLt
authored andcommitted
update file formatting
1 parent f79d618 commit b3d7e55

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

docs/introduction/Ecosystem.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,25 @@ Store enhancer that can debounce subscription notifications
202202
203203
```js
204204
const 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 />
209212
Store enhancer that allows dispatching arrays of actions
210213
211214
```js
212-
const store = configureStore({ reducer, enhancers: [ reduxBatch ] })
215+
const store = configureStore({ reducer, enhancers: [reduxBatch] })
213216
store.dispatch([{ type: 'INCREMENT' }, { type: 'INCREMENT' }])
214217
```
215218
216219
**[laysent/redux-batch-actions-enhancer](https://github.com/laysent/redux-batch-actions-enhancer)** <br />
217220
Store enhancer that accepts batched actions
218221
219222
```js
220-
const store = configureStore({ reducer, enhancers: [ batch().enhancer ] })
223+
const store = configureStore({ reducer, enhancers: [batch().enhancer] })
221224
store.dispatch(createAction({ type: 'INCREMENT' }, { type: 'INCREMENT' }))
222225
```
223226
@@ -239,12 +242,12 @@ const persistConfig = { key: 'root', version: 1, storage }
239242
const persistedReducer = persistReducer(persistConfig, rootReducer)
240243
export 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
})
249252
export const persistor = persistStore(store)
250253
```
@@ -256,17 +259,18 @@ Persistence layer for Redux with flexible backends
256259
const reducer = storage.reducer(combineReducers(reducers))
257260
const engine = createEngineLocalStorage('my-save-key')
258261
const 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 />
266270
Persistent 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)] })
270274
store.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 = () => ({
501505
An 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
})
508513
store.dispatch({ type: 'server/hello', data: 'Hello!' })
509514
```

0 commit comments

Comments
 (0)