0.11.0
Version 0.11.0 brings comprehensive updates: new documentation, non-destructive rendering, container-based root, hydration enhancements, thunks, app events, a revamped component lifecycle architecture, POJO (plain old JavaScript object) state, 100% test coverage restoration, and several bug fixes.
Root & Hydration
- The root now serves as a container, not a replaceable target, enabling non-destructive rendering.
- Hydration improvements:
- Checks if
load
returns the same root node, indicating non-hydration use, settingoldNode
andelement
to null. - If nodes differ, assumes
oldNode
as a valid virtual node andelement
as a DOM node, leaving re-hydration to the patch function.
- Checks if
- The
update
event triggers only for truthy new states, allowingfalse
returns to cancel re-rendering.
App Events
- Enforced use of a POJO as the application state; primitive types are no longer valid.
- New event functions introduced:
load
: Initializes and loads app resources.render
: Customizes the view function.action
: Logs or saves action data.resolve
: Modifies action behavior.update
: Inspects and validates state changes.
Lifecycle Events
- Deferred
oncreate
andonupdate
calls post-patch, maintaining correct order for nested elements. onupdate
now receives old data/attributes for prop change logic.- Ensured
onremove
is called when elements are replaced. - Removed
oninsert
in favor ofoncreate
.
Other
- Removed
rollup.config.js
in favor of direct command line Uglify use. - Renamed mixin composition to presets.
- Refactored thunks, removing built-in promise support for thunk composition.
- Rewrote Code of Conduct based on the open code of conduct.
Acknowledgments
Thank you to everyone who contributed to this release: @Swizz, @lukejacksonn, @andyrj, @jamen, @zaceno, @fsodano, @tscholl2, @matejmazur, @jcubic, @dodekeract, and @madebyherzblut. See you next time! 👋