What is Babel:
Babel is a Javascript Compiler
.
React Code is usually written in JSX (Javascript, HTML-like syntax
).
Browsers don't understand JSX
directly.
So Babel converts JSX into plain Javascript
.
What is Components
What
:
Components are independent, reusable building blocks of a React Application.
Each Component is like a function or class that returns JSX (UI).
Eg:
Navbar, Footer, Button
.
Why
:
Reusability, Readability, Maintainability, Testability, Scalability.
When:
When you want to reuse UI elements.
When your app's UI is getting complex.
When you want to separate concerns.
Top comments (0)