@ar.io/wayfinder-react
Overview
The @ar.io/wayfinder-react
package provides React-specific components and hooks for integrating Wayfinder into React applications. It offers a provider pattern for configuration and convenient hooks for fetching data with built-in loading states and error handling.
Wayfinder React automatically configures optimal settings for web
applications, including LocalStorageGatewaysProvider
to avoid rate limits
and performance optimizations in hooks to prevent unnecessary rerenders.
Installation
Quick Start
1. Add the Wayfinder Context Provider
Wayfinder React automatically uses LocalStorageGatewaysProvider
with
NetworkGatewaysProvider
to avoid rate limits and improve performance. You
don't need to configure this manually unless you want custom settings.
2. Use Hooks in Your Components
Advanced Configuration
Related
- useWayfinder: Access the complete Wayfinder instance
- useWayfinderRequest: Direct access to the request function
- useWayfinderUrl: URL resolution with loading states
For more advanced configuration options, see the Core Documentation.