Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
More meaningful examples in Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tejas Kumar committed Aug 31, 2018
1 parent f6f4fca commit cb5d6b0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,10 @@ const SearchThis = props => (
Debounce also accepts a number, which tells `Get` how long to wait until doing the request.
```jsx
```diff
const SearchThis = props => (
<Get path={`/search?q=${props.query}`} debounce={200 /*ms*/}>
- <Get path={`/search?q=${props.query}`} debounce>
+ <Get path={`/search?q=${props.query}`} debounce={200 /*ms*/}>
{data => (
<div>
<h1>Here's all the things I search</h1>
Expand All @@ -314,11 +315,12 @@ const SearchThis = props => (
It uses [lodash's debounce](https://lodash.com/docs/4.17.10#debounce) function under the hood, so you get all the benefits of it out of the box like so!

```jsx
```diff
const SearchThis = props => (
<Get
path={`/search?q=${props.query}`}
debounce={{ wait: 200, options: { leading: true, maxWait: 300, trailing: false } }}
- debounce={200}
+ debounce={{ wait: 200, options: { leading: true, maxWait: 300, trailing: false } }}
>
{data => (
<div>
Expand Down

0 comments on commit cb5d6b0

Please sign in to comment.