function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aman Verma 45Aman Verma 45 

In Events, are objects passed by Value or Reference (lightning components) ?

When we pass an object by firing events between components , whether they are passed by value or by reference?
Raj VakatiRaj Vakati
I belive its not based on the event .. pass by value and pass by Reference  is based on the attributes whihc you are passing ..

JavaScript. Primitives, such as String, are passed by value

Objects, such as Array or Map, are passed by reference

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_data_binding.htm
Raj VakatiRaj Vakati
Objects, such as Array or Map, are passed by reference when you pass it to the event