- Updated dependencies:
@remix-run/[email protected]
-
Add
HeadersArgs
type to be consistent with loaders/actions/meta and allows for using afunction
declaration in addition to an arrow function expression (#6247)import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno export function headers({ loaderHeaders }: HeadersArgs) { return { "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", }; }
-
Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- add
logDevReady
as replacement for platforms that can't initialize async I/O outside of the request response lifecycle. (#6204) - Updated dependencies:
@remix-run/[email protected]
-
We have made a few changes to the API for route module
meta
functions when using thefuture.v2_meta
flag. These changes are only breaking for users who have opted in. (#5746)V2_HtmlMetaDescriptor
has been renamed toV2_MetaDescriptor
- The
meta
function's arguments have been simplifiedparentsData
has been removed, as each route's loader data is available on thedata
property of its respectivematch
object// before export function meta({ parentsData }) { return [{ title: parentsData["routes/some-route"].title }]; } // after export function meta({ matches }) { return [ { title: matches.find((match) => match.id === "routes/some-route") .data.title, }, ]; }
- The
route
property on route matches has been removed, as relevant match data is attached directly to the match object// before export function meta({ matches }) { let rootModule = matches.find((match) => match.route.id === "root"); } // after export function meta({ matches }) { let rootModule = matches.find((match) => match.id === "root"); }
- Added support for generating
<script type='application/ld+json' />
and meta-related<link />
tags to document head via the routemeta
function when using thev2_meta
future flag
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
-
Introduces the
defer()
API from@remix-run/router
with support for server-rendering and HTTP streaming. This utility allows you to defer values returned fromloader
functions by returning promises instead of resolved values. This has been refered to as "sending a promise over the wire". (#4920)Informational Resources:
- https://gist.github.com/jacob-ebey/9bde9546c1aafaa6bc8c242054b1be26
- https://github.com/remix-run/remix/blob/main/decisions/0004-streaming-apis.md
Documentation Resources (better docs specific to Remix are in the works):
-
Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Export
V2_HtmlMetaDescriptor
andV2_MetaFunction
types from runtime packages (#4943) - Updated dependencies:
@remix-run/[email protected]
- Fixed type issues for the request handler context (#4715)
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- We've added a new type:
SerializeFrom
. This is used to infer the (#4013) JSON-serialized return type of loaders and actions.
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Updated dependencies:
@remix-run/[email protected]
- Add
index.ts
tomain
field to fix Node resolution issues when runningremix dev
orremix watch
(#3868) - Updated dependencies:
@remix-run/[email protected]
- We enhanced the type signatures of
loader
/action
anduseLoaderData
/useActionData
to make it possible to infer the data type from return type of its related server function. (#1254) - Updated dependencies
@remix-run/[email protected]