Explain the main differences between ReactJS and AngularJS

I'm five years old, loves JavaScript and needs some new toys to play with. But whats the main difference?

Did you find this post useful? Show some love!

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 from npm.

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.

Classic DEV Post from Dec 22 '17

How we can make a difference as software engineers

As the holiday season rolls around again the idea of doing good in the world ...

Follow @amandasopkin to see more of their posts in your feed.
George Marr
Crazy developer | Focussing on Theoretical programming and quantum computing | Tea?
Trending on dev.to
Back to basics: Naming
#naming #javascript #programming #discuss
Which contentious opinions in programming actually matter?
#discuss #webdev #programming #grannyrulescomments
What are your programming blogs?
Follow Friday!
How do you get a decent estimate on the time it will take to complete a task?
#discuss #work
What are the first differences you noticed in GitHub after Microsoft bought it? Post here yours!
#github #microsoft #discuss
Is it a good idea to leave your "digital fingerprint" in a company's project?
#discuss #help #idea #advice
What's your approach to fixing a "long-term" hairy bug?