Skip to content

0.11.0

Compare
Choose a tag to compare
@jorgebucaran jorgebucaran released this 12 Aug 19:37
· 850 commits to main since this release
9fe4f0e

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, setting oldNode and element to null.
    • If nodes differ, assumes oldNode as a valid virtual node and element as a DOM node, leaving re-hydration to the patch function.
  • The update event triggers only for truthy new states, allowing false 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 and onupdate 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 of oncreate.

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! 👋