Documentation

Premium gate

Protect one paid screen or one paid action first. Do not lock the entire app on day one.

1

Wrap premium content

screens/PremiumReportScreen.tsx

1import { PremiumGate } from "./src/paywall-ready";2 3export function PremiumReportScreen() {4  return (5    <PremiumGate>6      <ReportContent />7    </PremiumGate>8  );9}
2

Gate one action with the hook

screens/ExportButton.tsx

1function ExportButton() {2  const { isPremium, isLoading, presentPaywall } = usePremium();3 4  if (isLoading) return <Spinner />;5  if (!isPremium) return <Button title="Go Pro" onPress={presentPaywall} />;6 7  return <Button title="Export" onPress={runExport} />;8}