Skip to content

Commit

Permalink
✨ add multiple factory signatures (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien JUIF committed Jun 26, 2017
1 parent 2d11a1c commit 1b6f483
Show file tree
Hide file tree
Showing 6 changed files with 258 additions and 4 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ You need to use the factory to get a new set of reducer/actions/selectors :
import factory from 'trampss-redux-data-store'
```

This factory takes four parameters `factory(middlewares)(fieldKey)(path)(name)`:
This factory takes four parameters, you could use between these signatures :
- `factory(middlewares, fieldKey, path, name)`
- `factory(middlewares, fieldKey, path)(name)`
- `factory(middlewares, fieldKey)(path)(name)`
- `factory(middlewares)(fieldKey)(path)(name)`

Parameters are :
- **middlewares** (optional), contain an object with `pre` and `post` fields. Both are an array of middlewares to apply before and after the `core` middleware.
- **fieldKey** (mandatory), the field used to identify your objects (`id` for example)
- you have to set this parameter.
Expand Down
2 changes: 1 addition & 1 deletion index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b6f483

Please sign in to comment.