xjpro / react-in-angularjs

A super simple way to render React components in AngularJS
The Unlicense
23 stars 13 forks source link

fix: not re-render react component when pass object props to react #7

Closed jueinin closed 2 years ago

jueinin commented 3 years ago

$watchGroups method won't deep compare object. so when we pass an object from $scope to react. change of this object won't re-render react component. we need watch with deep equal.

xjpro commented 3 years ago

Looks good!

Let me test this thoroughly in my production application and I'll get back to you.

xjpro commented 3 years ago

So this doesn't break anything for me, but do we want to limit the scope of it to only two-way binding, i,e, = ?

jueinin commented 3 years ago

i have tried using single-spa to make react work with angularjs! thanks for your project,good luck😂