Babel
Babel is a
toolchain which can that is mainly used to convert Ecma script code to backward compatible version.
There are
many abilities which the babel can do,
- Transform syntax
- Pollyfil features
- Source code transformation
This supports
the latest version of java script . Babel can convert jsx syntax . Should start
with react pre set . This includes following plugins. Such as,
- @babel/plugin-syntax-jsx
- @babel/plugin-transform-react-jsx
- @babel/plugin-transform-react-display-name
This is to
create react element there are many kinds of utilities in babel. Babel can be
configured. All the API options in babel are allowed. When you use babel, the
recommended version of node version is the latest version. This would never run
on older versions of Node. Every breaking change will effects the project. This
has some issues with handling node modules. Babel is a core part of java script
eco system. This always converts the modern java script in to the form of
understanding by the older browsers.
Why the Babel?
React uses vanila JSX syntax. Babel converts
this JSX to vanilla Javascript. React too uses ES6 java script which is not
supported by many browsers. Babel basically converts ES6 java script for the
code which all browers can understand.
Comments
Post a Comment