# Extensions

Both [createMiddleware](https://rangle.gitbook.io/redux-beacon/broken-reference) and [createMetaReducer](https://rangle.gitbook.io/redux-beacon/index-1/create-meta-reducer) accept an **optional** extensions object as their third parameter. If provided, an extensions object should have at least one of the following properties:

```javascript
{
  logger,
  offlineStorage,
}
```

Each property corresponds to a different type of extension that Redux Beacon supports:

* [`offlineStorage` extensions](#offlinestorage-extensions)
* [`logger` extensions](#logger-extensions)

As an added convenience we maintain some prebuilt extension constructors:

| Extension Type   | Extension Constructor                                                                     |
| ---------------- | ----------------------------------------------------------------------------------------- |
| `logger`         | [logger](https://rangle.gitbook.io/redux-beacon/index-2/logger)                           |
| `offlineStorage` | [offlineWeb](https://rangle.gitbook.io/redux-beacon/index-2/offline-web)                  |
| `offlineStorage` | [offlineReactNative](https://rangle.gitbook.io/redux-beacon/index-2/offline-react-native) |

## logger extensions

`logger` extensions provide a means to log events after they are created.

## offlineStorage extensions

`offlineStorage` extensions provide a means to record analytics events even when your app is offline. An `offlineStorage` extension should have three methods: `saveEvents`, `purgeEvents`, and `isConnected`.
