Hello beautiful community. I have working in web apps with the most common kind of data: streams, array, objects and array of objects. When I emit this data:
const behaviorSubject = new BehaviorSubject(null);
somedata: SomeClass[];
somedata: = [{prop1: 1, prop2:"string", prop3:true}, {prop1: 2,
prop2:"string2", prop3:false}]
behaviorSubject.next(somedata);
And receive that data
// Another js file
receiver: SomeClass[];
objectService.observerFromBehaviorSubject().subscribe(resp => this.receiver = resp);
The received data within 'resp' from arrow function is an array of objects, so the question is: the local array "receiver" has the value of the stream by reference or it is the same as a raw data (think primitive data types: number, string, boolean which those values you can copy in simple ways) (By Value)?