@manyrows/appkit-react
v0.1.6
Published
Customer usage import { AppKit, AppKitAuthed, useAppKit } from "@manyrows/appkit-react";
Readme
Customer usage import { AppKit, AppKitAuthed, useAppKit } from "@manyrows/appkit-react";
function CustomerApp() { const { snapshot, logout } = useAppKit();
return (
export default function Page() { return (
<AppKitAuthed fallback={null}>
<CustomerApp />
</AppKitAuthed>
</div>); }
Option A (recommended): AppKitAuthed gate component
Pros
Dead simple for customers.
Doesn’t require them to understand snapshot shape.
Lets you change snapshot internals later without breaking them.
Customer code
<AppKit ... />
Option B: only useAppKit() and customers gate themselves
Pros
Fewer exports.
Very explicit.
Customer code
<AppKit ... /> {useAppKit().isAuthenticated ? : null}
