Skip to content

Commit f608f03

Browse files
committed
5.0.0
1 parent e22b5e1 commit f608f03

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
### v5.0.0 (2018/3/22)
4+
5+
**Breaking Changes**
6+
7+
* When a function is included in the `components` array, it will now be called
8+
with a different signature. Previously, it was called with one argument, `results`,
9+
an array of the currently-accumulated results.
10+
11+
In React Composer v5, the function will be called with an object with two properties,
12+
`results` and `render`. `results` is the same value as before, and `render` is the
13+
render prop that you should place on the [React element](https://reactjs.org/docs/glossary.html#elements)
14+
that is returned by the function.
15+
16+
* `mapResult` and `renderPropName` have been removed. The new signature of the function
17+
described above gives you the information that you need to map the results, or to use
18+
a custom render prop name.
19+
20+
If you need help migrating from an earlier version of React Composer, we encourage you to
21+
read the new examples in the README. They demonstrate how you can use the new
22+
API to accomplish the things that you previously used `renderPropName` and `mapResult` for.
23+
324
### v4.1.0 (2018/2/10)
425

526
**Improvements**

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-composer",
3-
"version": "4.1.0",
3+
"version": "5.0.0",
44
"description": "Compose render prop components",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -67,4 +67,4 @@
6767
"dependencies": {
6868
"prop-types": "^15.6.0"
6969
}
70-
}
70+
}

0 commit comments

Comments
 (0)