Skip to content

Commit

Permalink
Release 1.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Dijou committed May 27, 2019
1 parent 0932198 commit df87abc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
23 changes: 20 additions & 3 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
# 1.7.5

- Improve README. (thanks @samiskin)
- TypeScript support for Redux 4. (thanks @AbraaoAlves)

# 1.7.4

- Add `asError` typings. (thanks @mdwagner)
Expand Down Expand Up @@ -231,9 +236,15 @@ bindedAction.dispatched(); // true
You can now have some metadata. It's just as the payload, you need a function to reduce the arguments as a metadata object and it will be the third argument inside the reducer.

```javascript
const doStuff = createAction('do some stuff', arg => arg, (one, two)=> {so: 'meta'});
const doStuff = createAction(
'do some stuff',
arg => arg,
(one, two) => {
so: 'meta';
}
);
const reducer = createReducer({
[doStuff]: (state, payload, meta)=> payload
[doStuff]: (state, payload, meta) => payload
});
```

Expand All @@ -242,7 +253,13 @@ const reducer = createReducer({
Sometimes, you need to share actions between client and server, or between clients. You can no longer rely on id generated at runtime, you need to use strict manually provided constants. That's not the main goal of the lib, but if you really need it, just use a fully uppercase description and it will be use as the id.

```javascript
const serializedDoStuff = createAction('DO_STUFF', arg => arg, (one, two)=> {so: 'meta'});
const serializedDoStuff = createAction(
'DO_STUFF',
arg => arg,
(one, two) => {
so: 'meta';
}
);
```

# 0.1.1
Expand Down
6 changes: 5 additions & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "redux-act",
"version": "1.7.4",
"version": "1.7.5",
"license": "Apache-2.0",
"description": "An opinionated lib to create actions and reducers for Redux",
"keywords": [
Expand All @@ -25,6 +25,10 @@
"bugs": {
"url": "https://github.com/pauldijou/redux-act/issues"
},
"prettier": {
"tabWidth": 2,
"singleQuote": true
},
"devDependencies": {
"@babel/cli": "7.4.4",
"@babel/core": "7.4.5",
Expand Down

0 comments on commit df87abc

Please sign in to comment.