Route status handler mapping.
Status handlers are called with a path and should return a new route or a promise that resolves to a new route.
const statuses: Statuses = { [StatusCode.NotFound]: { component: NotFound, props: { importantInfo: "lets go!" } }, [StatusCode.BadRequest]: (path) => { notifySomething(path); return { component: BadRequest, props: { importantInfo: "something went wrong..." } }; }} Copy
const statuses: Statuses = { [StatusCode.NotFound]: { component: NotFound, props: { importantInfo: "lets go!" } }, [StatusCode.BadRequest]: (path) => { notifySomething(path); return { component: BadRequest, props: { importantInfo: "something went wrong..." } }; }}
Route status handler mapping.
Status handlers are called with a path and should return a new route or a promise that resolves to a new route.