From b44bfcaf75f2e6cbc95e1cb5bbb300bc9ac1ee6e Mon Sep 17 00:00:00 2001 From: Sabine Lim Date: Sat, 20 May 2023 21:20:30 +1000 Subject: [PATCH] Change reactive to observable --- Basalt/plugins/reactive.lua | 2 +- docs/guides/xml.md | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Basalt/plugins/reactive.lua b/Basalt/plugins/reactive.lua index b8c81e1..a45b8ff 100644 --- a/Basalt/plugins/reactive.lua +++ b/Basalt/plugins/reactive.lua @@ -79,7 +79,7 @@ return { end local object = { - reactive = function(initialValue) + observable = function(initialValue) local value = initialValue local observerEffects = {} local get = function() diff --git a/docs/guides/xml.md b/docs/guides/xml.md index 6fc9c5d..7ce97c5 100644 --- a/docs/guides/xml.md +++ b/docs/guides/xml.md @@ -89,23 +89,23 @@ This layout can be passed props like any other object in the layout, as seen in ## Reactivity (BETA) -Reacting to user input is easier than ever with Basalt XML's concept of reactive values and observers for said values. This powerful feature allows for properties to be derived automatically from reactive values, without needing the programmer to manually call functions to update the object. +Reacting to user input is easier than ever with Basalt XML's concept of observable values and observers for said values. This powerful feature allows for properties to be updated automatically from observable values, without needing the programmer to manually call functions to update the object. -To create a reactive value, simply use the `basalt.reactive(initialValue)` function, which returns getter and setter functions. For example: +To create an obervable value, simply use the `basalt.observable(initialValue)` function, which returns getter and setter functions. For example: ```xml ``` -You could then hook up this reactive value to a property. +You could then hook up this observable value to a property. ```xml