Changing a variable with a workflow: Custom Javascript vs Change variable value

I have an array of objects that I am presenting as a Collection.

I am adding values to the array dynamically using a Workflow.

I’ve noticed that using Custom Javascript workflow step to push elements to the array does not update the collection on screen. However, the array has been updated.

What does work, though, is using the Change variable value workflow. I am still using the same javascript code and returning the updated array to update the same array.

I’m just wondering why this is? Why doesn’t Custom Javascript update the collection presentation? Is this a Vue.js thing?

I think only the objects are reactive (when u change it with js), so if you make an object, and its property is an array, it should react to changes.

Interesting! Thanks @Broberto!

Just so I have it clear, I would need to wrap the array in an object and access it as a property.

In other words, using an Array type is not reactive,