PacemDataElement is the core element to stand on for data observing.
Its most important property is model. Lean on it to orchestrate your ViewModel.
Basic "flat" properties are easily made observable (i.e. bindable).
Remember, as a best practice, to
use a
PacemDataElementand itsmodelproperty as the most reliable observable: it will always be guaranteed to emit apropertychangeevent.
Example:
Nested properties don't always notify their change, they do if a two-way binding is set between the PacemDataElement and the data modifiers.
This is typical in a form scenario.
Example:
Property persistAs lets the model of a PacemDataElement to persist in the localStorage.
Re-entering a page having persisted data permits to have resumed the last registered changes.
Example:
Property change notifications can be debounced and throttled, in order to mitigate - for instance - eccessive DOM changes.
Here are the propeties:
debounce: can be a number, in that case it signifies "milliseconds", or true, which means debounce at browser's frame rate.throttle: is a boolean that specifies whether actual debounce algorithm should be used (false) or throttle instead (when true).To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.