Lesson 2 a: Some pre requisite knowledge (Theory) - udaisshekhawat/ReactNativeTutorial GitHub Wiki

Earlier, Javascript was built by using a <script> tag. But now, we preprocess our JavaScript in order to access experimental features and language extensions like JSX. To preprocess, we mainly use tool Babel.

Babel: Babel is a configurable compiler which lets you use experimental features and extensions, compiling down into older versions of JavaScript that can be supported on wider range of platforms.

Babel configuration: You can configure babel by including .babelrc file in the root directory of your project. .babelrc specifies: a. which JavaScript experimental features to enable b. which plugin to use (JSX)

React native takes care of configuring babel. Hence, we do not have to create .babelrc If you want to modify default presets, you can use the npm package metro-react-native-babel-preset as a base configuration and apply additional configuration/plugin on the top.

⚠️ **GitHub.com Fallback** ⚠️