On this pageFetchEventProviderOverviewFetchEventProvider(props, context?): `null` | `ReactElement<any, any>`Context for consuming the current FetchEvent in a React component.Note that when used with RequestRouter, context hooks are only available within the React component returned by a route handler:const PageComponent: React.FC = () => { const { params } = useParams() return <div>Foo</div>const app = new RequestRouter()app.get('/foo', () => { return <PageComponent />})If you need to access the FetchEvent before the React component is rendered, use the event parameter passed to the route handler.ParametersNameTypepropsMiddlewareContextPropscontext?anyReturnsnull | ReactElement<any, any>Defined innode_modules/@types/react/index.d.ts:520
Context for consuming the current
FetchEvent
in a React component.Note that when used with
RequestRouter
, context hooks are only available within the React component returned by a route handler:If you need to access the
FetchEvent
before the React component is rendered, use theevent
parameter passed to the route handler.