map.apps Bundle APIs 4.20.0
    Preparing search index...

    Module reactivity

    This module integrates the reactivity-API (@conterra/reactivity-core) into map.apps.

    NOTE: This module and @conterra/reactivity-core are still actively being worked on. There may be breaking changes based on user feedback; stability can not yet be guaranteed.

    This module simply re-exports everything from @conterra/reactivity-core. You can use this module to conveniently refer to the version of reactivity-core that is provided by map.apps:

    import { reactive, computed } from "apprt-core/reactivity";
    const firstName = reactive("John");
    const lastName = reactive("Doe");
    const fullName = computed(() => `${firstName.value} ${lastName.value}`);
    console.log(fullName.value); // "John Doe"
    lastName.value = "Smith";
    console.log(fullName.value); // "John Smith"

    For more information about the reactivity API, see the README of @conterra/reactivity-core.

    For an example of how to use reactive values together with Vue, take a look at useReactiveSnapshot from apprt-vue.