Stone.js API
    Preparing search index...
    • Decorator to set the status code of the response.

      Type Parameters

      • T extends Function = Function

      Parameters

      • statusCode: number = 200

        The status code of the response.

      • headers: HeadersType = {}

        The headers for the response.

      Returns MethodDecorator

      A method decorator.

      import { Page, PageStatus } from '@stone-js/use-react';

      @Page('/user-profile')
      class UserPage {
      @PageStatus()
      handle() {
      return { name: 'John Doe' };
      }
      }