import { getPayload } from 'payload' import config from '@payload-config' import { getAllFeatureFlags, isFeatureEnabled } from 'payload-feature-flags/rsc' export default async function HomePage() { const payload = await getPayload({ config }) const allFlags = await getAllFeatureFlags(payload) const activeCount = Object.keys(allFlags).length const isNewFeatureEnabled = await isFeatureEnabled('new-feature', payload) return (
Simple demonstration of the Payload CMS Feature Flags plugin
The "new-feature" flag is enabled! This content is only visible when the flag is active.
Use the Payload admin panel to create and manage feature flags.
Open Admin Panel