Skip to content

0.11.0

Compare
Choose a tag to compare
@localvoid localvoid released this 14 May 13:22
· 957 commits to master since this release

0.11.0 (2018-05-14)

Bug Fixes

  • gestures: replace FEATURES with TOUCH_EVENTS (30f154e)
  • scheduler: ignore autofocusing on text nodes (71b45ae)

Code Refactoring

  • core: split feature detection flags into several constants (23bb7d2)
  • remove specialized input and button factories (6ec699e)
  • vdom: change shouldUpdate API for stateless components (e4daf4c)
  • vdom: rename children() to fragment() (b832e67)
  • vdom: rename function component() to statefulComponent() (b591819)
  • vdom: rename function elementFactory() to element() (6324a91)

Features

  • debug: enable HTML nesting rules violation checker (2695a8b)
  • test: add hasFactory() predicate (8abbdce)
  • test: add hasNextSibling() predicate (5d10979)
  • test: add support for <stopDirtyChecking /> nodes to snapshots (cdfa1fd)
  • vdom: check context child node type in dev mode (8c8f97f)
  • vdom: check return type for render functions in dev mode (c479ca4)
  • vdom: replace autofocus() method with function (acf3bf4)
  • vdom: use value() method to assign checked value for inputs (39c8b40)

BREAKING CHANGES

  • vdom: function children() is renamed to fragment().
  • vdom: shouldUpdate for stateless components is now assigned with a withShouldUpdate() function.

Before:

const C = statelessComponent(
  (props) => h.div().c(props.title),
  (prev, next) => (prev.title !== next.title),
);

After:

const C = withShouldUpdate(
  (prev, next) => (prev.title !== next.title),
  statelessComponent(
    (props) => h.div().c(props.title),
  ),
);
  • specialized input and button factories were removed.

Before:

h.inputCheckbox();
h.buttonReset();

After:

h.input().a({ type: "checkbox" });
h.button().a({ type: "reset" });
  • vdom: elementFactory() function renamed to element()
  • vdom: component() function renamed to statefulComponent()
  • vdom: VNode method checked() is removed.

Before:

h.inputCheckbox().checked(true);

After:

h.inputCheckbox().value(true);
  • vdom: VNode method autofocus() is replaced with autofocus() function.

Before:

h.div().autofocus(true);

After:

autofocus(h.div());
  • core: FEATURE constant and FeatureFlags enum are replaced with:
  • PASSIVE_EVENTS
  • KEYBOARD_EVENT_KEY
  • MOUSE_EVENT_BUTTONS
  • TOUCH_EVENTS
  • POINTER_EVENTS
  • INPUT_DEVICE_CAPABILITIES