> For the complete documentation index, see [llms.txt](https://react-observatory.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://react-observatory.js.org/api-reference/composereducercreator.md).

# composeReducerCreator

A helper function that takes the Object with Reducers and returns a reducer creator for dynamic reducer injection by [applyAsyncReducers.](/api-reference/applyasyncreducers.md)

The reducer creator is only required for setting-up the store.

### Arguments

1. `reducers` (`Object`): An object whose values correspond to different reducing functions that need to be combined into one. See the notes below for some rules every passed reducer must follow.

### Returns

(`Function`): A function that is used to create a set of reducers and will be used by [applyAsyncReducers](/api-reference/applyasyncreducers.md) enhancer for dynamic Reducer injection. Serves as a replacement for [combineReducers.](https://redux.js.org/api-reference/combinereducers)

### Example: Composing a Reducer creator

## `./src/reducers`

```javascript
import { composeReducerCreator } from '@react-observatory/inject-reducer'

const counter = (state = 0, action) => {
  if (action.type === 'Up') {
    return state + 1
  }
  return state
}

export default composeReducerCreator({
  counter
})
```
