Skip to content

Commit

Permalink
Updated documentation with new composable usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
isak authored and podefr committed Aug 22, 2020
1 parent 10bc1c1 commit 07f90f6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ import debounceRender from 'react-debounce-render';
const debouncedMyReactComponent = debounceRender(MyReactComponent, 100, { maxWait: 1000 });
```

### Compose with other HOCs:

Use `debounce` instead of `debounceRender` to compose with other HOCs and some compose utility function.
[maximizing composability convention](https://reactjs.org/docs/higher-order-components.html#convention-maximizing-composability)

```js
import { debounce } from 'react-debounce-render';
import { withStyles } from '@material-ui/core/styles';
import { compose } from 'ramda';

// ...

export default compose(
withStyles(styles),
debounce(200, {maxWait: 400})
)(MyReactComponent);

```

# Changelog

### 6.1.0 - JUNE 23 2020
Expand Down

0 comments on commit 07f90f6

Please sign in to comment.