Skip to content
This repository was archived by the owner on Aug 3, 2023. It is now read-only.

Commit cf188ac

Browse files
authored
Fix documentation error for prop name
`transformData` is actually currently `transformResponse`
1 parent 89dedf1 commit cf188ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,15 @@ response is from the cache or from a network request. Receives two arguments:
299299
</Fetch>
300300
```
301301

302-
##### `transformData`
302+
##### `transformResponse`
303303

304304
A function that is called with the data returned from the response. You can use this
305305
hook to transform the data before it is passed into `children`.
306306

307307
```jsx
308308
<Fetch
309309
url="/posts/2"
310-
transformData={data => data.post>
310+
transformResponse={data => data.post>
311311
{({ fetching, error, response, data }) => {
312312
<div>
313313
{fetching && ('Loading...')}
@@ -323,7 +323,7 @@ hook to transform the data before it is passed into `children`.
323323
</Fetch>
324324
```
325325
326-
> Note: `transformData` does not modify the value of `response.data`. The transformed data is
326+
> Note: `transformResponse` does not modify the value of `response.data`. The transformed data is
327327
> made available to you in the render prop argument under the `data` key.
328328
329329
##### `responseType`

0 commit comments

Comments
 (0)