Recently I found an awesome library that allows for React components to be used in Angular applications, called ngReact
My question is about the watch-depth attribute that can be declared on a reactDirective component:
<body ng-app="app">
<div ng-controller="helloController">
<hello-component watch-depth="reference" fname="person.fname" lname="person.lname"></hello-component>
</div>
</body>
Looking at ngReact documentation for the reactDirective service I see that there are 3 possible values for watch-depth:
- Reference
- Collection
- Value
In my initial exploration using ngReact I have been sticking with using the default value option.
My question is, what are the differences between these types?
Simple examples for when each watch-depth type is ideal to use would be great!