In rxjs, subscribing to Observable is equivalent to an event?

my idea is to subscribe to an array of elements of a numeric type, so will the business logic in the subscription be executed whenever I give the new element
of push in this array? Look at the picture:

The result of the

test is that the new push element in the array will not be printed to the
rxjs in the console can do this effect? Or is there something wrong with my understanding?


rxjs's Observable and vue's observer mode is not a thing


Observable is a stream, it has many functions. Api will help you understand


you need to have an observable object, and then subscribe to handle some operations of the observable object through the observer.
you can solve this problem through proxy.

let list = [1, 2, 3, 4];
let listProxy = new Proxy(list, {
  set(target, prop, value) {
    if (prop != 'length') {
      // ...
      console.log(`Setting: ${value}`);
    }
    Reflect.set(target, prop, value);
    return true;
  }
});
listProxy.push(5);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b481-2ba66.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b481-2ba66.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?