feat: support Preact error boundaries (#1442)
This commit is contained in:
@@ -36,9 +36,13 @@ export interface AdvancedPreactOptions extends PreactOptions {
|
||||
__c?(vnode: VNode, commitQueue: Component[]): void;
|
||||
/** Attach a hook that is invoked before a vnode has rendered. */
|
||||
__r?(vnode: VNode): void;
|
||||
errorBoundaries?: boolean;
|
||||
}
|
||||
const options = preactOptions as AdvancedPreactOptions;
|
||||
|
||||
// Enable error boundaries in Preact.
|
||||
options.errorBoundaries = true;
|
||||
|
||||
export interface RenderOptions<Data> {
|
||||
route: Route<Data> | UnknownPage | ErrorPage;
|
||||
islands: Island[];
|
||||
|
||||
Reference in New Issue
Block a user