rad 1.2.0 copy "rad: ^1.2.0" to clipboard
rad: ^1.2.0 copied to clipboard

A zero-dependency frontend framework for creating high-performant web apps using Dart.

1.2.0 #

RenderEvents, a event system for RenderElements.

RenderEvents are the events that framework will emit when it interacts with a RenderElement. Just like we can add event listeners for user interactions on DOM elements, we can now add event listeners for framework interactions on RenderElements. Similar to DOM events, we've different types of RenderEvents for different types of interactions which are listed below:

  • didRender is a event that's emitted after framework finishes rendering the output of render to the DOM.
  • didUpdate is a event that's emitted after framework finishes rendering the output of update to the DOM.
  • willUnMount is a event that's emitted when framework is about to remove the widget from the DOM.
  • didUnMount is a event that's emitted after framework finishes removing the widget from the DOM.

RenderElements can decide to listen to a particular or all render events by adding event listeners.

Comparing RenderEvents with DOM events, there are few differences & restrictions:

  • RenderEvents do not have capture/bubble phase.
  • RenderEvents are meant to be listened internally inside RenderElements.
  • Listeners for RenderEvents can be attached only during initial render, and cannot be updated.

These restrictions are temporary and we'll lift them when needed.

RenderEvents are meant to solve the problem of limited control over lifecycle in RenderElements. Previously we were providing a sub-class WatchfulRenderElement with hardcoded lifecycle. Now, using the new RenderEvents API, you can add as much or as little lifecycle as you want, to any RenderElement(widget). This new API effectively makes WatchfulRenderElement obsolete but we'll keep it for backward compatibility at zero-cost(it's also using the new RenderEvents API from now on).

Bug fixes

  • (Fixed) Renderer reconciling all sibling widgets on dependent updates(sometime disposing siblings because of that).

1.1.0 #

Added following lifecycle methods to State:

  • afterMount: Gets called after framework finishes rendering widget to DOM.
  • afterUpdate: Gets called after framework finishes re-rendering widget to DOM.
  • afterUnMount: Gets called after framework finishes removing widget from DOM.

Added following lifecycle methods to WatchfulRenderElement:

  • afterUpdate: Gets called after framework finishes re-rendering widget to DOM.
  • dispose: Gets called after framework finishes removing widget from render tree and is about to remove it from DOM.

Others

Bug fixes

  • (Fixed) WatchfulRenderElement.afterUnMount getting called before framework finishes removing widget from DOM(while it should get called after the complete removal of widget)

1.0.2 #

  • (Fixed) Value not setting/updating correctly on following Input widgets: InputUrl, InputTime, InputTelephone, InputSearch, InputRange, InputPassword, InputNumber, InputMonth, InputEmail, InputText, InputDateTimeLocal, InputDate and InputColor.

  • (Fixed) InputHidden missing from public API.

1.0.1 #

  • Stable release.
  • If curious, you can checkout development change log here.
53
likes
0
pub points
55%
popularity

Publisher

verified publishererlage.com

A zero-dependency frontend framework for creating high-performant web apps using Dart.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

meta

More

Packages that depend on rad