I'm five years old, loves JavaScript and needs some new toys to play with. But whats the main difference?
For further actions, you may consider blocking this person and/or reporting abuse
I'm five years old, loves JavaScript and needs some new toys to play with. But whats the main difference?
For further actions, you may consider blocking this person and/or reporting abuse
Quoc Huynh Website -
Judy -
Tiago Temporin -
Alexandra -
Top comments (3)
I like the food analogy, but Angular can also do SSR so I think this is how I would explain it:
React is when you go to a restaurant and can pick every ingrediente in your food, do you want bread? you can use any bread from
npm
, do you want meat again anyone fromnpm
.In Angular you have all the ingredients already picked for you, you just need to use them to make your food.
This means React will let you do anything as you want, but this also mean you need to know a little more about the ingredients. While in Angular you just need to join them to make your food, but if you don't like the @angular/bread and want to use
my-custom-bread
from npm you may have it harder because is the Angular version is tightly coupled with the rest of your food (Angular app).This is basically the difference between a library (React) and a framework (Angular).
Sometimes you go to a restaurant and they cook the food in the back and then a waiter brings it out to you. This is "server-side" food-rendering. Sometimes you go to a restaurant and they bring ingredients to your table and cook it right there! That's "client-side" food rendering.
If you're at a "client-side" restaurant and the server does all of the cooking + presents you with the food, that's React - it has one-way food binding. If you occasionally jump in + help, that's Angular - it has two-way food binding!
If you like toys like the ouija, and you have fun doing strict ceremonies, that's angular.
If you like lego, and you have fun building things with different pieces and colors, that's reactjs.