@sylphx/lens-next
v2.2.17
Published
Next.js integration for Lens API framework
Readme
@sylphx/lens-next
Next.js integration for the Lens API framework with SSR support.
Installation
bun add @sylphx/lens-nextUsage
// app/providers.tsx
"use client";
import { LensProvider } from "@sylphx/lens-next";
import { client } from "./client";
export function Providers({ children }) {
return <LensProvider client={client}>{children}</LensProvider>;
}
// app/page.tsx
import { useQuery } from "@sylphx/lens-next";
import { client } from "./client";
export default function Page() {
const { data, loading } = useQuery(client.user.get({ id: "1" }));
return <div>{data?.name}</div>;
}License
MIT
Built with @sylphx/lens-client, @sylphx/lens-react, and @sylphx/lens-server.
✨ Powered by Sylphx
