You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's great to know about this technique, but I also think it's important to point out that in the functional-style world, you would never mutate an object, but instead create a new one by transforming the existing one. Then whatever needs to monitor changes would simply check if the reference changed. This is how Angular change detection works by default, for example.
I'm not saying proxy-based change detection is bad, I'm just saying the article should tell about both approaches (at least mention the functional-style way).
The text was updated successfully, but these errors were encountered:
I think proxy based change detection is one of the simpler examples of not scaring people from proxies, but agree it could have some alternative pointers.
The whole reason for the article came down to using it for proxying the existing fetch requests. 😅
I wanted to check if you wanted to help contribute to the article by adding the functional style change detection as a alternative heading?
I've read this article: https://daily-dev-tips.com/posts/detect-object-changes-with-javascript-proxy/
I think it's great to know about this technique, but I also think it's important to point out that in the functional-style world, you would never mutate an object, but instead create a new one by transforming the existing one. Then whatever needs to monitor changes would simply check if the reference changed. This is how Angular change detection works by default, for example.
I'm not saying proxy-based change detection is bad, I'm just saying the article should tell about both approaches (at least mention the functional-style way).
The text was updated successfully, but these errors were encountered: