Const
A class decorator for defining a class as a React Page route action. Uses the Match decorator internally to register the route with the HTTP GET method.
Match
GET
Optional
Configuration options for the route definition, excluding the methods property.
methods
A method decorator to be applied to a class method.
import { Page } from '@stone-js/use-react';@Page('/user-profile')class UserPage { handle({ event }): Record<string, string> { return { name: 'Jane Doe' }; } render({ data }) { return <h1>User name: {data.name}</h1>; }} Copy
import { Page } from '@stone-js/use-react';@Page('/user-profile')class UserPage { handle({ event }): Record<string, string> { return { name: 'Jane Doe' }; } render({ data }) { return <h1>User name: {data.name}</h1>; }}
A class decorator for defining a class as a React Page route action. Uses the
Matchdecorator internally to register the route with the HTTPGETmethod.