Sha256: 9f5f9ef7d4210a2e4348d2502823946efd0d34e5ffe4f0421c62efb0d9deba66

Contents?: true

Size: 943 Bytes

Versions: 2

Compression:

Stored size: 943 Bytes

Contents

# Reducers
Documentation of generated Redux code for reducers.

## Example
The `helloWorld/reducers/index.jsx` example that results from running the generator with the Redux option may be slightly confusing because of its simplicity. For clarity, what follows is a more fleshed-out example of what a reducer might look like:

```javascript
import usersReducer from './usersReducer';
import blogPostsReducer from './blogPostsReducer';
import commentsReducer from './commentsReducer';
// ...

import { $$initialState as $$usersState } from './usersReducer';
import { $$initialState as $$blogPostsState } from './blogPostsReducer';
import { $$initialState as $$commentsState } from './commentsReducer';
// ...

export default {
  $$usersStore: usersReducer,
  $$blogPostsStore: blogPostsReducer,
  $$commentsStore: commentsReducer,
  // ...
};

export const initalStates = {
  $$usersState,
  $$blogPostsState,
  $$commentsState,
  // ...
};
```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
react_on_rails-1.0.1 docs/gen-notes/reducers.md
react_on_rails-1.0.0 docs/gen-notes/reducers.md