Skip to content

re: First Impressions: learning Angular after React/Redux VIEW POST

re: Man, you should review what you are saying and comparing here. For example, hot reloading is not related at all with change detection

Hmm yeah you're right, change detection listens for state changes and actually doesn't change the DOM. Hot reloading does the complete opposite...


Whether change detection triggers a render depends on how you’ve setup your Angular component’s change detection strategy. By default, Angular watches all template-bound properties and will re-render.

OnPush, by contrast, effectively memo’s Inputs (read: props), and only re-renders when an Input value or ref has changed.

I just learned about using OnPush to optimize change detection last night. Having spent a few weeks with Angular now I'm less conflicted trying to connect the dots between React and Angular on what I'm confused by. It's taught like two separate schools of thought I can't reconcile yet. Frankly I'm not even sure which I prefer!

code of conduct - report abuse