Ajay Yadav
Ajay Yadav

@ATechAjay

7 Tweets 1 reads Nov 02, 2022
The ultimate guide to Babel:
πŸ€” Why Babel?
πŸ€” What is Babel?
πŸ€” What does Babel do in React JS?
🧡...
πŸ€” Why Babel?
- As we know, React JS is a component-based JavaScript library that is used to build websites. That component is created using JSX code.
- But a browser can not understand JSX code syntax. That means making a browser understandable, we need something, right?
- To make the browser understandable, we need a π’•π’“π’‚π’π’”π’‘π’Šπ’π’†π’“ that is used to convert a piece of code into another piece of code.
- That means React JS uses π’•π’“π’‚π’π’”π’‘π’Šπ’π’†π’“ that is used to transform JSX code into plain JavaScript code.
In short:
- JSX Code: A browser can't be able to understand.
- Plain JavaScript Code: A browser understands.
πŸ€” What is Babel?
- Babel is a JavaScript compiler that is used to transform other code (which is not known by the browser) into plain JavaScript code.
- React JS also uses Babel as a JavaScript compiler.
πŸ€” What does Babel do in React JS?
- React JS also uses a Babel compiler that is used to transform JSX code into plain JavaScript code.
- That means for React JS code to be understood by the browser, we need to have a compiler or transpiler.
That's all for now, we will meet in the next thread😍
πŸ”” Follow Me @ATechAjay
For:
🌐 Web Development
✨ JavaScript
βš›οΈ React JS
πŸ“ Writing Skill
πŸ”₯ Motivation
πŸ’Ή Growth
β›” But Not For Only Resources & Shitpost 😁
Thank you so much for staying to the end of this threadπŸ’š

Loading suggestions...