Minor Changes
-
BREAKING CHANGE:
RequestContext.headersnow returns a standardHeadersinstance instead of theSuperHeaders/Headerssubclass from@remix-run/headers. As a result, the@remix-run/headerspeer dependency has now been removed.If you were relying on the type-safe property accessors on
RequestContext.headers, you should use the new parse functions from@remix-run/headersinstead:// Before: router.get('/api/users', (context) => { let acceptsJson = context.headers.accept.accepts('application/json') // ... }) // After: import { Accept } from '@remix-run/headers' router.get('/api/users', (context) => { let accept = Accept.from(context.headers.get('accept')) let acceptsJson = accept.accepts('application/json') // ... })