github marko-js/marko @marko/runtime-tags@6.5.2
marko@6.5.2

one hour ago

Patch Changes

  • #4741 74a44ad Thanks @LuLaValva! - Explain how to act on <let> writes when it is given an event handler such as onChange, and how to bind with a fallback when := is given ?? or ||.

  • #4753 b2b661e Thanks @DylanPiercey! - A style property may now appear only once across a style value. A repeat the compiler can see, such as style=["color:blue", { color: tint }] or style=[{ color: a }, { color: b }], is a compile error, and one known only while rendering, such as an imported part that also sets color, throws in development. Before, the server wrote every declaration so the later one won, while the client could keep one in the template and update the other alone, so the two disagreed. Give each property one source, such as style={ color: tint ?? "blue" }.

    In exchange more style values update one property at a time: an imported part such as style=[base, { color: tint }] stays in the template, and only color updates when tint changes.

  • #4752 ab416ad Thanks @DylanPiercey! - Fix values lost on resume when a template or <define> renders itself, or reads the tag variables of several calls to one <define>: content an outer instance passes down reads the outer instance's values, and a tag variable no longer takes another instance's state for its own.

  • #4750 0eec052 Thanks @DylanPiercey! - Fix dynamic tag names typed wrongly from a named import of a template or a number beside a template. A tag name that is a hoisted <const> whose value is certainly not a function (<${Tag}/> above <const/Tag=Child/>) no longer compiles: it read the value from outside the tag that declares it, so it rendered even where that tag did not. A native tag's event or change handler that is certainly a truthy value other than a function (onClick=(input.x ? "a" : "b"), onClick=("alert" + input.y), or a <const> holding a string) no longer compiles.

  • Updated dependencies [7257bdc, 7257bdc, 7c37c20]:

    • @marko/compiler@5.43.6

Don't miss a new marko release

NewReleases is sending notifications on new releases.