Installation
How to install and set up Honeycomb in your project.
Install the package
Install @hiveio/honeycomb-react via your preferred package manager:
npm install @hiveio/honeycomb-reactpnpm add @hiveio/honeycomb-reactyarn add @hiveio/honeycomb-reactbun add @hiveio/honeycomb-reactWrap your app with HiveProvider
Create a providers file and wrap your root layout:
app/providers.tsx
"use client";
import { HiveProvider } from "@hiveio/honeycomb-react";
export function Providers({ children }: { children: React.ReactNode }) {
return (
<HiveProvider>
{children}
</HiveProvider>
);
}app/layout.tsx
import { Providers } from "./providers";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<Providers>{children}</Providers>
</body>
</html>
);
}Use in your components
components/MyComponent.tsx
import { useHive } from "@hiveio/honeycomb-react";
function MyComponent() {
const { chain, is_loading, error } = useHive();
if (is_loading) return <p>Connecting...</p>;
if (error) return <p>Error: {error}</p>;
return <p>Connected!</p>;
}API Nodes
By default, HiveProvider connects to public Hive API nodes with automatic fallback. You can customize the endpoint list — see HiveProvider and API Tracker for details.
Production
Public nodes may have rate limits. For production apps, consider running your own node or using a dedicated RPC provider.
What's Next?
Now that you have Honeycomb set up, you can start adding components: