Hooks
usePrice
Fetch a lightweight quote to preview route pricing
Parameters
Parameter | Description | Required |
---|---|---|
client | A RelayClient instance. You can create one using the SDK or retrieve one using the useRelayClient hook from the UI kit. | ✅ |
options | Options that map directly to the price API. | ✅ |
onResponse | A callback function that triggers when a response is returned. | ❌ |
queryOptions | Tanstack query options. Refer to the Tanstack docs. | ❌ |
Return Data
The hook returns an object with the base Tanstack Query response. The data returned will be the response from the price API.