diff --git a/3-react-native-internals/3.1-react-native-internals.md b/3-react-native-internals/3.1-react-native-internals.md index e72c3a8..4598eef 100644 --- a/3-react-native-internals/3.1-react-native-internals.md +++ b/3-react-native-internals/3.1-react-native-internals.md @@ -5,7 +5,7 @@ and it has been around for quite a while. Why would anyone want to use RN? The primary difference between RN and Cordova based apps is that Cordova based apps run inside a webview while RN apps render using native views. RN apps have direct access to all the Native APIs and views offered by the underlying mobile OS. Thus, RN apps have the same feel and performance as that of a native application. -At first, it is easy to assume that React Native might be compiling JS code into respective native code directly. But this would be really hard to achieve since Java and Objective C are strongly typed languages while Javascript is not! Instead, RN does something much more clever. Essentially, React Native can be considered as a set of React components, where each component represents the corresponding native views and components. For example, a native TextInput will have a corresponding RN component which can be directly imported into the JS code and used like any other React component. Hence, the developer will be writing the code just like for any other React web app but the output will be a native application. +At first, it is easy to assume that React Native might be transpiling JS code into respective native code directly. But this would be really hard to achieve since Java and Objective C are strongly typed languages while Javascript is not! Instead, RN does something much more clever. Essentially, React Native can be considered as a set of React components, where each component represents the corresponding native views and components. For example, a native TextInput will have a corresponding RN component which can be directly imported into the JS code and used like any other React component. Hence, the developer will be writing the code just like for any other React web app but the output will be a native application. Ok! This looks like black magic 🙄.