Can't change Observable var


#1

Im trying to show status bar on var change, but i cant make it, i tried with isOn.value etc etc but without success
still at the start saying its False


#2

Should share some actual code and not just image.

You didn’t declare isOn, so showNow won’t affect it…

var isOn = Observable(false);
function showNow() {
  isOn.value = true;
}
module.exports = {
  isOn: isOn
};

#3

Still not work :joy:the red button is where i click


#4

my bad, forgot to export the “showNow” function:

var isOn = Observable(false);
function showNow() {
  isOn.value = true;
}
module.exports = {
  isOn: isOn,
showNow: showNow
};

#5

Thanks it worked, damn we also need export the functions XD i would never find out