Skip to content

Page

ts
import { Page } from "@dpg.gg/router";

Overview

preact компонент который отвечает за загрузку схемы в зависимости от url

ts
const routeFetch = async () => ... // Fetch resource & render logic

const schema = [
	...
	{ element: Page, props: { path: node.path, fetch: routeFetch } }, 
];

Params

path

  • Type: string

Адрес url при котором должна отрисовываться схема

fetch

  • Type async Function

Функция загрузки и отрисовки схемы