as shown below in the code, in the constructor i create a ref
array. i want to push this.#recentlyHoveredGeomProps.value
into the reactive array object which is this.#recentlyHoveredGeometriesProps
.
but for the code posted below, when the listen()
is called, i receive the following results despite i am sure that this.#recentlyHoveredGeomProps.value
has values:
recentlyHoveredGeometriesProps":[]
to solve this i tried the following:
const arr = new Array()
arr.push(this.#recentlyHoveredGeomProps)
this.#recentlyHoveredGeometriesProps.value = arr;
then, listen()
return values.
what is wrong in the following approach please:
this.#recentlyHoveredGeometriesProps.value.push(this.#recentlyHoveredGeomProps.value);
code
constructor() {
this.#recentlyHoveredGeometriesProps = ref([]);
}
...
...
this.#recentlyHoveredGeometriesProps.value.push(this.#recentlyHoveredGeomProps.value);
listen() {
return this.#recentlyHoveredGeometriesProps;
}