Skip to content

Commit

Permalink
docs: Tutorial onError should be onRejected (QwikDev#2284)
Browse files Browse the repository at this point in the history
When using onError in the IDE as provided in the example it gives the following error:
Property 'onError' does not exist on type 'IntrinsicAttributes & ResourceProps<string[]>'

The solution says it should be onRejected
  • Loading branch information
bryanhannes authored Nov 28, 2022
1 parent ce55389 commit ead0f98
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ On the server the `<Resource>` does not render `loading` state, instead, it paus
<Resource
value={resourceToRender}
onPending={() => <div>Loading...</div>}
onError={(reason) => <div>Error: {reason}</div>}
onRejected={(reason) => <div>Error: {reason}</div>}
onResolved={(data) => <div>{data}</div>}
/>
```
Expand Down

0 comments on commit ead0f98

Please sign in to comment.