component@0.7.0
Breaking Changes📦 remixView on GitHub →
⚠ 2 breaking✨ 3 features🐛 2 fixes🔧 5 symbols
Summary
This release introduces an `attrs(...)` mixin and improved array handling in `mix` props for easier recipe creation. It also fixes a critical bug in controlled `<select>` handling and updates mixin lifecycle behavior, including a breaking change to mixin render callback arguments.
⚠️ Breaking Changes
- Mixin render callbacks no longer receive the `children` or `innerHTML` arguments. Returned mixin elements cannot override host subtree content.
- Usage of `handle.element` and `createElement(handle.element, ...)` is now restricted to patching host props and nested `mix` values only.
Migration Steps
- If you relied on `children` or `innerHTML` being passed to mixin render callbacks, update the callback signature and logic.
- If you were using `handle.element` or `createElement` to manipulate host subtree content beyond props or nested `mix` values, update the implementation to use the new limitations.
✨ New Features
- Introduced an `attrs(...)` mixin for applying default host props via `mix`, allowing recipe authors to set attributes like `type="button"` without overriding explicit JSX props.
- Nested arrays are now allowed in `mix` props and are flattened during JSX normalization, simplifying composition of style and behavior recipes.
- `renderToStream()` now accepts an optional `resolveClientEntry(entryId, component)` callback for resolving opaque client entry IDs during server rendering.
🐛 Bug Fixes
- Fixed controlled `<select>` element restoration timing: restoration is now deferred to the `change` event instead of the `input` event, ensuring `change` handlers read the correct, newly selected value before controlled state is restored.
- The `handle.signal` within mixins now correctly aborts when the specific mixin slot is removed, even if the host node remains mounted, aligning with expected `remove` lifecycle cleanup.