Skip to main content
Module

x/udibo_react_app/server.tsx>AppRouterOptions

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
interface AppRouterOptions
import { type AppRouterOptions } from "https://deno.land/x/udibo_react_app@0.4.0/server.tsx";

Type Parameters

optional
AppContext extends Record<string, unknown> = Record<string, unknown>

Properties

A react router route object. The build script will automatically generate these for your application's routes. The route object is a default export from the _main.tsx in your routes directory.

optional
env: AppEnvironment

Default environment variables that you would like to share with the browser for all requests.

optional
providerFactory: (context: Context<AppState<AppContext>>) => ComponentType<{ children: ReactNode; }>

Creates a provider around the application.

optional
Context: ReactContext<AppContext>

A context object for the App. State stored within the AppContext will be serialized and shared with the browser.

optional
renderToReadableStream: renderToReadableStream

Used to render the application. If you'd like to transform the stream before it is returned to the client, you can wrap the default renderToReadableStream function with a custom renderToReadableStream function.

optional
router: Router

The oak router for your application. The build script will automatically generate these for your application's routes. The router object is a default export from the _main.ts in your routes directory.

optional
workingDirectory: string

The working directory of your application. Defaults to the current working directory that your application is running from.

optional
devPort: number

The port for the dev script's live reload server.