Skip to content

Commit 2c23f1f

Browse files
committed
Update to 5.0.0
- Merges @yched's PR #12 which fixes Issues #11 - Remove lodash dependency which fixes Issue #8
1 parent d9fca2a commit 2c23f1f

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ const debouncedMyReactComponent = debounceRender(MyReactComponent, 100, { leadin
4242

4343
# Changelog
4444

45+
### 5.0.0 - OCT 04 2018
46+
47+
There is no breaking change in this version despite the major version change, this is only to highlight the fact that most of the internal implementation has changed since PR #12.
48+
49+
* Removes unused `lodash` dependency since we're using `lodash/debounce`. Thanks [@yched](https://github.com/yched) for raising the issue!
50+
* Using [@yched](https://github.com/yched) cleaner implementation which doesn't use the deprecated lifecycle methods nor trigger any warning. See Issue [#11](https://github.com/podefr/react-debounce-render/issues/11).
51+
4552
### 4.0.3 - JULY 19 2018
4653

4754
* Revert 4.0.2 change and use latest lodash version again, though importing `lodash/debounce` directly. Thanks [@faizrr](https://github.com/faizrr) for raising the issue!

e2e/src/App.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ describe('Given App is rendered', () => {
2323
it('Then DisplayCount is only rendered once after the initial rendering', () => {
2424
expect(+wrapper.find(".render-count").text()).toBe(2);
2525
});
26+
27+
it('Then receives the latest props', () => {
28+
expect(+wrapper.find('.data-length').text()).toBe(10);
29+
});
2630
});
2731

2832
describe('When unmounts before a scheduled call to setState', () => {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-debounce-render",
3-
"version": "4.0.3",
3+
"version": "5.0.0",
44
"homepage": "https://github.com/podefr/react-debounce-render",
55
"description": "A React higher order component that will debounce the rendering of your React components",
66
"main": "lib/index.js",
@@ -18,7 +18,6 @@
1818
"author": "Olivier Scherrer <[email protected]>",
1919
"license": "MIT",
2020
"dependencies": {
21-
"lodash": "^4.17.10",
2221
"lodash.debounce": "^4.0.8"
2322
},
2423
"peerDependencies": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function debounceRender(ComponentToDebounce, ...debounceArgs) {
1313
componentWillUnmount() {
1414
this.updateDebounced.cancel();
1515
}
16-
16+
1717
render() {
1818
return <ComponentToDebounce {...this.props} />;
1919
}

0 commit comments

Comments
 (0)