dy / spect

Observable selectors in DOM
https://dy.github.io/spect
MIT License
76 stars 8 forks source link

input → v #174

Closed dy closed 4 years ago

dy commented 4 years ago

inputs are just another type of observable container, no need to have a separate entry.

dy commented 4 years ago

This disables setter. Setter is used to replace previous input with the new value, not to set some target value. And that's wrong. Setter must provide access to the target. Therefore, the source init must work only at init time v(source, get?, set?), not afterwards. Moreover, afterward call does not allow 1. storing any-values (array or observable) easily 2. redefining mapper (bummer). So v has compatible signature with f only on init.

dy commented 4 years ago

Done.