What's new in v3.3.0
- revamped readme and improved documentation through github wiki
- added support for native observedAttributes and attributeChangedCallback
- implemented dom diffing
- added latest typescript support
With the addition of dom diffing, PlumeJS now fixed few glaring issues like flickering and loss of focus on current active element when re-rendering. This is done internally and no need to make any changes to existing code base.
While taking webcomponents approach, PlumeJs missed the implementation of native support for observedAttributes.
For Example:
@Component(...)
class MyComponent {
static observedAttributes = ['data-label'];
onNativeAttributeChanges(name, oldValue, newValue) {
console.log(name, oldValue, newValue);
}
render() {...}
}in html
<my-component data-label='test'></my-component>That's it. whenever the attribute data-label changes, it calls onNativeAttributeChanges of MyComponent. Remember that observedAttributes and ObservedProperties are different as the former is used for html attributes and the later is used for component props.
Full Changelog: v3.1.1...v3.3.0
PS: If there is any build issue after upgrading to latest version, add skipLibCheck: true to the project tsconfig.json file