Skip to content

v2.6.0

Latest
Compare
Choose a tag to compare
@akuzko akuzko released this 04 Mar 23:12

Release Description

  • Added data mapper-on-access functionality for additional optimization. This allows to use pre-processed stash value and re-render component only when this processed value changes. For example:
function TodoIndicator() {
  const allDone = useData("todos.list.items", (items) => {
    return items.every(item => item.status === "completed");
  });

  // ...
}

The third argument of useData hook is comparator function that should be used when mapper function returns arrays or objects.