Releases: makeswift/makeswift
@makeswift/[email protected]
Patch Changes
- 3a32698: fix(runtime): more efficient element lookup, fixes a performance regression introduced in 0.22.0
@makeswift/[email protected]
Patch Changes
- Updated dependencies [11ae3c2]
- @makeswift/[email protected]
@makeswift/[email protected]
Patch Changes
- 11ae3c2: refactor: rewrite element tree rendering using "unified" controls interface
@makeswift/[email protected]
Minor Changes
-
11ae3c2: refactor: rewrite element tree rendering using "unified" controls interface
Breaking Changes
ReactNode[]
propsPreviously, registered components that accepted a list of
ReactNode
s, like theSlots
component below, could render the list by simply interpolating its value in JSX:export const Slots = forwardRef(function Slots( { slots }: { slots: ReactNode[] }, ref: Ref<HTMLDivElement>, ) { return ( <div ref={ref}>{slots}</div> // ^^^^^^^ ) }) runtime.registerComponent(Slots, { type: '@acme/list-of-slots', label: 'Slots', props: { slots: List({ label: 'Slots', type: Slot() }), }, })
This worked because the
slots
value was never actually passed as a list ofReactNode
s. Instead, it was passed as a singleReactNode
representing an internal component rendering the list as a recursive cons-like structure.If you have registered components that expect a list of
ReactNode
s and rely on this undocumented behavior, you must update your code to wrap each node in aReact.Fragment
with a corresponding key:export const Slots = forwardRef(function Slots( { slots }: { slots: ReactNode[] }, ref: Ref<HTMLDivElement>, ) { return ( - <div ref={ref}>{slots}</div> <div ref={ref}>{slots.map((slot, i) => (<Fragment key={i}>{slot}</Fragment>))}</div> ) })
-
Updated dependencies [11ae3c2]
- @makeswift/[email protected]
- @makeswift/[email protected]
@makeswift/[email protected]
Patch Changes
- bdfdfcf: fix: "attempted import" errors on registering component in server-side code
@makeswift/[email protected]
Patch Changes
- Updated dependencies [da076ce]
- @makeswift/[email protected]
- @makeswift/[email protected]
@makeswift/[email protected]
Patch Changes
- Updated dependencies [da076ce]
- @makeswift/[email protected]
@makeswift/[email protected]
Patch Changes
- 6f88345: fix: stalled calls/memory leaks on repeated function deserialization
@makeswift/[email protected]
Patch Changes
- 4726279: fix:
registerComponent
fails to correctly deduce resolved value type in some cases
@makeswift/[email protected]
Minor Changes
-
92cb216: Next.js 15 / React 19 RC support
Breaking Changes
Pages Router's custom
Document
The Makeswift custom
Document
export has been moved from@makeswift/runtime/next
to@makeswift/runtime/next/document
. To migrate, adjust the customDocument
import insrc/pages/_document.ts
as follows:- export { Document as default } from '@makeswift/runtime/next' export { Document as default } from '@makeswift/runtime/next/document'