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!
DISCUSSION (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 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 May 22

How Art School Prepared Me for Programming

Using observation and illustration as a tool for understanding

READ POST
Follow @annarankin to see more of their posts in your feed.
George Marr
By day I write Python and other beautiful languages. By night I do the same thing but with more caffeine. Dyslexia may be in my mind, but that shall not stop me!
More from @rapidnerd
explain Kubernetes like I'm five
#explainlikeimfive
Trending on dev.to
How do you think of angularjs application
#discuss
Writing Beautiful Code
#webdev #productivity #php
Who's looking for open source contributors? (September 24 edition)
#discuss #opensource
What code snippets do you use?
#discuss #javascript #snippets
Why Your Best Work is Hardest to Finish
#productivity #career #beginners
How do you shift between the coding mindset and other head spaces?
#discuss
If you don't hire juniors, you don't deserve seniors
#career #management #recruiting
Juggling Multiple Languages Simultaneously
#discuss