Sanity Library Reference Docs
    Preparing search index...

    Function useCommentsModeV2

    • Beta

      The comments mode as a promise: 'default' when the plan has the feature, 'upsell' when it does not, null when the feature check failed (comments then stay out of the way, as if disabled). Settles once the check has answered. Read it with use() in the leaf that renders differently per mode, under a Suspense boundary; never on a path whose suspension would hold up a layout, and never awaited in an event handler.

      Returns Promise<CommentsMode>