Skip to content

Reactivity: data update

The reactivity is a key feature of the Graphane microframework that enables automatic and efficient data binding between the application's data and the visualization. It ensures that when the data changes, the corresponding parts of the UI are automatically updated to reflect those changes.

When a g-composer component is created, Graphane automatically identifies all the data properties accessed. It then establishes a dependency relationship between the component and those data properties.

Graphane achieves this by leveraging JavaScript's object property by Proxies. When a data property changes, the reactive system is notified. It then triggers a process called "update" where it re-evaluates the components that depend on the changed data property. It compares the new and old values and updates the affected visualization accordingly.

Reactivity is managed at both surface and deep level, detecting changes in the array and dates.

Released under the MIT License.