RequestContext for Middleware & Handlers
What's Changed
- The (request: Request , params: HandlerParams) => response pattern has been replaced by (ctx: RequestContext) => Response.
- RenderContext (prev HandlerParams) is now a class containing request and data as properties (accessing properties of ctx.request was a type error if ctx is object).
- Middleware can now be supplied as an array or single function and take only one argument, RequestContext.
- Types have been redistributed into the relevant files.
- Many lib and examples files have been rewritten for improved readability and layout.
- All of the examples have been updated to the latest API.
- The default Cache-Control header of ssr and static handlers has been fixed (was previously permanently caching assets)
Full Changelog: v0.2.2...v0.3.0