avenger
avenger copied to clipboard
Make clear you can't pass multiple parameters to a query
From the docs, it's not clear what to do when the query is implemented accepting multiple arguments.
Say I have a function and a React component:
-
function dogs(breed: string, color: string)
-
<Dogs />
It should be made clear that the correct way to pass breed
and color
to the function is not
<Dogs queries={{ restaurantsByLocation: ("labrador", "black") }} />
Instead, you need to change the function signature into
function dogs(hint: { breed: string, color: string})
and pass value from the component as
<Dogs queries={{ dogs: { breed: "labrador", color: "black" } }} />
@giuscri could you suggest a good place to add such a hint in the current README?