UNPKG

preact-router-lazy

Version:

Async route component for preact-router

19 lines (16 loc) 449 B
import { Component, h } from 'preact'; interface IAsyncRouteProps { path: string; component?: any; getComponent?: ( this: AsyncRoute, url: string, callback: (component: any) => void, props: any ) => Promise<any> | void; loading?: () => h.JSX.Element; [key:string]: any; } export default class AsyncRoute extends Component<IAsyncRouteProps, {}> { public render(): h.JSX.Element | null; }