Back to Remix

Patch.11 Forward Client Entry Root Errors

packages/component/.changes/patch.11-forward-client-entry-root-errors.md

2.11.1604 B
Original Source

Forward hydrated client entry, frame reload, and ready() initialization errors to the top-level runtime target returned by run(), and type that runtime as a TypedEventTarget with an error event whose .error value is unknown.

This lets app.addEventListener('error', ...) observe bubbling DOM errors captured by hydrated client entry roots, frame reload failures such as rejected resolveFrame() calls, and initialization failures that reject app.ready(), while also giving TypeScript-aware consumers the concrete event names and safer payload types exposed by run() and root listeners.