Skip to content

Commit

Permalink
Update hooks.md documentation (#2687)
Browse files Browse the repository at this point in the history
The documentation of getProducts hook was outdated.

If you agree, I'd also add more comprehensive documentation when it
comes to handling errors. I was getting an empty products list and
without adding the `.catch` statement to the `getProducts` and seeing
that I was missing the `skus` property, I couldn't figure it out. I
think it should be clear from the documentation that `getProducts`
returns a promise.
  • Loading branch information
emilcieslar committed Mar 1, 2024
1 parent b5eb38d commit dffa863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/api-reference/hooks.md
Expand Up @@ -62,7 +62,7 @@ const App = () => {
<>
<Button
title="Get the products"
onPress={getProducts(['com.example.consumable'])}
onPress={getProducts({ skus: ['product.id'] })}
/>

{products.map((product) => (
Expand Down

0 comments on commit dffa863

Please sign in to comment.