Bloomca / veles

UI library with main focus on performance
https://bloomca.github.io/veles/
MIT License
48 stars 0 forks source link

small utility functions fixes #76

Closed Bloomca closed 1 month ago

Bloomca commented 1 month ago

Description

Two things:

  1. in select function, use a function for setState, since we can potentially return a function ourselves, and it will be automatically executed if we don't use the function format
  2. in combine function, we didn't skip the first call, which caused several setValues to be executed. It wasn't a problem, because it happened right after the state creation in the same CPU cycle, so the state couldn't have any subscriptions, just a small optimization.