canjs v5.30.0 Release Notes

Release Date: 2019-07-17 // almost 5 years ago
  • ๐Ÿ†• New Ecosystem Packages

    StacheElement, ObservableObject, ObservableArray

    ๐Ÿ‘ These are renamed versions of StacheDefineElement, DefineObject, and DefineArray that support as static props instead of static define (static define is also still aliased for apps that were using this).

    class Pet extends ObservableObject { static props = { name: { type: String, required: true } }; }class Pets extends ObservableArray { static items = Pet; }class PetsApp extends StacheElement { static view = ` {{#for(pet of pets)}} \<p\>{{pet.name}}\</p\> {{/for}}`; static props = { pets: { type: type.convert(Pets), get default() { return [{ name: "shadow" }, { name: "marshmallow" }]; } } }; }customElements.define("pets-app", PetsApp);
    

    can-construct-super

    ๐Ÿ“ฆ This package already existed, but the constructSuper named export was added to the ecosystem module.

    โœ‚ Removed Ecosystem Packages

    • ๐Ÿšš can-stache-deifne-element - this was removed but the StacheDefineElement named export still exists (it is an alias for StacheElement)
    • ๐Ÿšš can-define-object - this was removed but the DefineObject named export still exists (it is an alias for ObservableObject)
    • ๐Ÿšš can-define-array - this was removed but the DefineArray named export still exists (it is an alias for ObservableArray)