Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/udibo_react_app/server.tsx

A React Framework for Deno that makes it easy to create highly interactive apps that have server side rendering with file based routing for both your UI and API.
Go to Latest
import * as udiboReactApp from "https://deno.land/x/udibo_react_app@0.11.0/server.tsx";

Functions

Creates a Udibo React App.

Creates an Oak router for your application.

This middleware ensures all errors in the route are HttpErrors. If an error isn't an HttpError, a new HttpError is created with it as the cause. If a boundary is specified, it will add the boundary to the HttpError. If an AppErrorBoundary exists with a matching boundary, it will be used to handle the error. If a boundary is not specified, the first AppErrorBoundary without a boundary specified will handle the error. If a boundary is specified, but no AppErrorBoundary exists with a matching boundary, the error will go unhandled.

Generates an Oak router for a routes directory. The router returned by this function is the default export from the _main.ts file in the routes directory. This function is meant for internal use only.

This function tells the dev server when the app server is listening. If you are not using serve, you must add an event listener to your app that will call this function once it's listening. If this function is not called, the browser will not automatically refresh when the app server is restarted. If called before the app server is listening, the browser will refresh before the app server is ready to handle the request. This function will not do anything if the app is not running in development mode.

Renders a React app to a readable stream that can be returned to the client. This is the default renderToReadableStream used for rendering React apps.

Creates and serves a Udibo React App.

Interfaces

An interface that represents the options for creating an App Router.

A record of application state when handling a request.

A representation of the routers for a routes directory that is used to generate an Oak router. This interface is meant for internal use only.