Return Types
Beyond JSX, you can directly return text
, number
, or json
content.
Text and Numbers
Section titled “Text and Numbers”Returns a text/plain response. Numbers are converted to strings.
export const GET = () => 'Ok'
export const GET = () => 42
Returns an application/json response.
export const GET = () => { return { "message": "Welcome to xink!" }}