0.7.0
Pre-releaseFeatures
‣ ReadonlyReactiveValue
and ReadonlyReactiveArray
— a version of the reactive entity that can't be mutated externally. This can be used to pass a listenable reactive entity without letting the recipient mutate it themselves. Deriving ReactiveValue
and ReactiveArray
methods like map
and pipe
, and computed()
now return readonly variants. Both ReactiveValue
and ReactiveArray
now extend their respective readonly variant.
‣ 〈ReactiveValue, ReactiveArray〉.prototype.readonly
: a getter that returns a readonly version of the target reactive entity.
‣ ReadonlyReactiveValue.prototype.pass
: lets you pass a reactive value to a component in templates without binding.
‣ More descriptive error messages for TypeErrors and XML related errors.
‣ destiny:props
for assigning multiple properties at once.
‣ Node
s are now allowed in reactive()
.
‣ ReactiveValue.prototype.unbind()
is now chainable.
‣ Component.prototype.template
now accepts reactive values.
‣ DestinyFallback
now accepts fallback
and catch
properties, which can be used when loading components asynchronously.
‣ XHTML templates now accept Promise<Component>
in addition to Component
and Promise<{default: Component}>
at the element identifier position.
‣ Setter properties in classes that extend Component
are now upgraded automatically after the custom element gets upgraded.
‣ Safari support.
‣ The library can now be compiled with all pedantic TS checks enabled.
Fixes
‣ Computed, piped, and mapped reactive values will no longer implicitly leak memory. Also, some other memory management and performance improvements.
‣ Types should now work properly when importing via NPM.
‣ reactiveProperties()
now returns readonly objects.
‣ Indices given by ReadonlyReactiveArray.prototype.〈entries, keys〉()
are now correctly updated.
‣ Readonly objects and arrays are now allowed for reactive()
.
‣ Updates on ReactiveValue
s and ReactiveArray
s can now be forced. The option existed previously, but it didn't actually do anything.
BREAKING CHANGES
‣ ReactivePrimitive
renamed to ReactiveValue
.
‣ reactiveObject()
renamed to reactiveProperties()
.
‣ 〈ReactiveValue, ReactiveArray〉.prototype.set()
now takes an options object as the second argument with the previous second argument as the noUpdate
option.
‣ Components loaded asynchronously from a module will now need to be the default export of the module.