Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions docs/introduction/Ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,25 @@ Store enhancer that can debounce subscription notifications

```js
const debounceNotify = _.debounce(notify => notify())
const store = configureStore({ reducer, enhancers: [ batchedSubscribe(debounceNotify) ] })
const store = configureStore({
reducer,
enhancers: [batchedSubscribe(debounceNotify)]
})
```

**[manaflair/redux-batch](https://github.com/manaflair/redux-batch)** <br />
Store enhancer that allows dispatching arrays of actions

```js
const store = configureStore({ reducer, enhancers: [ reduxBatch ] })
const store = configureStore({ reducer, enhancers: [reduxBatch] })
store.dispatch([{ type: 'INCREMENT' }, { type: 'INCREMENT' }])
```

**[laysent/redux-batch-actions-enhancer](https://github.com/laysent/redux-batch-actions-enhancer)** <br />
Store enhancer that accepts batched actions

```js
const store = configureStore({ reducer, enhancers: [ batch().enhancer ] })
const store = configureStore({ reducer, enhancers: [batch().enhancer] })
store.dispatch(createAction({ type: 'INCREMENT' }, { type: 'INCREMENT' }))
```

Expand All @@ -239,12 +242,12 @@ const persistConfig = { key: 'root', version: 1, storage }
const persistedReducer = persistReducer(persistConfig, rootReducer)
export const store = configureStore({
reducer: persistedReducer,
middleware: (getDefaultMiddleware) =>
middleware: getDefaultMiddleware =>
getDefaultMiddleware({
serializableCheck: {
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
},
}),
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER]
}
})
})
export const persistor = persistStore(store)
```
Expand All @@ -256,17 +259,18 @@ Persistence layer for Redux with flexible backends
const reducer = storage.reducer(combineReducers(reducers))
const engine = createEngineLocalStorage('my-save-key')
const storageMiddleware = storage.createMiddleware(engine)
const store = configureStore({
reducer,
middleware: getDefaultMiddleware => getDefaultMiddleware.concat(storageMiddleware)
const store = configureStore({
reducer,
middleware: getDefaultMiddleware =>
getDefaultMiddleware.concat(storageMiddleware)
})
```

**[redux-offline/redux-offline](https://github.com/redux-offline/redux-offline)** <br />
Persistent store for Offline-First apps, with support for optimistic UIs

```js
const store = configureStore({ reducer, enhancer: [ offline(offlineConfig) ] })
const store = configureStore({ reducer, enhancer: [offline(offlineConfig)] })
store.dispatch({
type: 'FOLLOW_USER_REQUEST',
meta: { offline: { effect: {}, commit: {}, rollback: {} } }
Expand Down Expand Up @@ -328,7 +332,7 @@ listenerMiddleware.startListening({
const { specialData } = action.meta

analyticsApi.trackUsage(action.type, user, specialData)
},
}
})
```

Expand Down Expand Up @@ -501,9 +505,10 @@ const fetchUsers = () => ({
An opinionated connector between socket.io and redux.

```js
const store = configureStore({
reducer,
middleware: getDefaultMiddleware => getDefaultMiddleware.concat(socketIoMiddleware)
const store = configureStore({
reducer,
middleware: getDefaultMiddleware =>
getDefaultMiddleware.concat(socketIoMiddleware)
})
store.dispatch({ type: 'server/hello', data: 'Hello!' })
```
Expand Down