What to build
Implement the createApp function — the root configuration entry point for framework users. It accepts a config object with context (a function that receives a Request and returns custom context) and onError (a global error handler).
export default createApp({
context: (request) => ({
sdk: new SDK({ apiKey: "..." }),
}),
onError: (error, request) => {
console.error(error);
return new Response("Internal Server Error", { status: 500 });
},
});
The return type of context should propagate through the type system so that ctx in loaders is fully typed with the user's custom properties + route params.
Acceptance criteria
Blocked by
What to build
Implement the
createAppfunction — the root configuration entry point for framework users. It accepts a config object withcontext(a function that receives a Request and returns custom context) andonError(a global error handler).The return type of
contextshould propagate through the type system so thatctxin loaders is fully typed with the user's custom properties + route params.Acceptance criteria
createAppaccepts{ context, onError }configcontextfunction receivesRequestand returns user-defined contextonErroris optional, receives(error: unknown, request: Request)Blocked by