Lesson 2 of 60 – What is React Native?
3%

What is React Native?

React Native is a framework for building mobile applications using JavaScript and React. It allows developers to create mobile user interfaces using reusable components and React concepts.

Note: React Native is especially useful for developers who already know JavaScript and React because concepts such as components, props, state, events and Hooks can be applied to mobile application development.

1. Definition of React Native

React Native is a framework used to develop mobile applications with JavaScript and React.

It provides components and APIs that help developers create mobile interfaces and application features.

2. React Native Uses React

React Native is built around the React programming model.

This means developers use familiar React concepts such as components, props, state and Hooks when developing mobile applications.

3. React Native Uses JavaScript

JavaScript is one of the main programming languages used for React Native development.

const name = "Soopro";

console.log(name);

Students who already know JavaScript can use their existing knowledge while learning React Native.

4. React Native Is for Mobile Development

React Native is primarily used for developing applications that run on mobile devices.

Examples include educational apps, shopping apps, social applications, business applications and management systems.

5. Android Development

React Native can be used to create applications for Android devices.

Developers can run and test their applications using Android devices or Android development environments.

6. iOS Development

React Native can also be used to develop applications for iOS devices.

This makes React Native useful when developers want to target more than one major mobile platform.

7. Cross-Platform Development

One important idea behind React Native is cross-platform development.

Developers can use React Native to build applications for multiple platforms while sharing a significant amount of application code.

8. React Native Components

React Native provides components for building mobile user interfaces.

Common components include:

  • View
  • Text
  • Image
  • TextInput
  • ScrollView
  • Pressable

9. View Component

The View component is commonly used as a container for other components.

<View>
    <Text>Welcome</Text>
</View>

10. Text Component

The Text component is used to display text on the mobile screen.

<Text>Welcome to React Native</Text>

11. Image Component

The Image component is used to display images in a React Native application.

<Image
    source={{uri: "https://example.com/logo.png"}}
/>

12. TextInput Component

The TextInput component allows users to enter text.

It can be used for login forms, registration forms, search boxes and other data-entry screens.

<TextInput
    placeholder="Enter your name"
/>

13. JSX in React Native

React Native uses JSX to describe the user interface.

function App() {
    return (
        <View>
            <Text>Hello Mobile App</Text>
        </View>
    );
}

JSX makes the component structure easier to understand.

14. React Native Is Different from HTML

Although React Native uses JSX syntax, it does not use ordinary HTML elements for its mobile interface.

For example, React Native uses View instead of a normal HTML div.

15. React Native Styling

React Native provides a styling system for designing mobile interfaces.

const styles = StyleSheet.create({
    box: {
        padding: 20,
        backgroundColor: "lightblue"
    }
});

16. Flexbox Layout

Flexbox is commonly used to arrange components in React Native.

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: "center",
        alignItems: "center"
    }
});

Flexbox helps create organized mobile layouts.

17. Props in React Native

Props allow a parent component to pass data to a child component.

function Student({ name }) {
    return (
        <Text>Student: {name}</Text>
    );
}

18. State in React Native

State is used to store data that can change while an application is running.

The useState Hook is commonly used for state management.

const [count, setCount] = useState(0);

19. Event Handling

React Native applications can respond to user interactions such as button presses and text input.

<Pressable onPress={() => alert("Button Pressed")}>
    <Text>Press Me</Text>
</Pressable>

20. Forms and User Input

Forms are an important part of many mobile applications.

React Native can use TextInput, state and event handlers to create interactive forms.

Examples include login, registration, contact and search forms.

21. Lists of Data

Mobile applications often need to display many records.

React Native provides FlatList and SectionList for displaying lists efficiently.

22. Navigation

Mobile applications normally contain multiple screens.

Navigation allows users to move between screens such as Home, Profile, Products, Login and Settings.

React Navigation is commonly used for navigation in React Native applications.

23. API Communication

React Native applications can communicate with backend servers using HTTP APIs.

For example, an application can request student information from a PHP and MySQL backend.

fetch("https://example.com/api/students")
    .then(response => response.json())
    .then(data => console.log(data));

24. Local Storage

Some application data may need to remain available on the device.

React Native applications can use appropriate storage solutions for saving local data such as preferences or session information.

25. Authentication

Authentication allows an application to identify a logged-in user.

A typical mobile application can provide login, registration and logout functionality through a backend API.

26. Device Features

Mobile applications can work with device capabilities when appropriate permissions and APIs are available.

Examples include camera, location, notifications, media and other device features.

27. Testing Applications

React Native applications can be tested on physical devices and development environments such as emulators or simulators.

Testing helps developers find UI, navigation, API and device-related problems.

28. Real-World Applications

React Native can be used for many types of mobile applications.

  • Education Apps
  • Business Apps
  • Student Management Apps
  • E-Commerce Apps
  • Booking Apps
  • Social Applications
  • Service Applications

29. React Native Development Flow

A typical React Native development process can be understood as:

Write Code
    ↓
Create Components
    ↓
Add Styling
    ↓
Manage State
    ↓
Add Navigation
    ↓
Connect APIs
    ↓
Test Application
    ↓
Build Application

30. React Native Learning Path

To become a React Native developer, you should learn the topics in a logical order.

JavaScript
    ↓
React
    ↓
React Native Basics
    ↓
Components
    ↓
Styling
    ↓
Props & State
    ↓
Forms & Lists
    ↓
Navigation
    ↓
APIs
    ↓
Storage
    ↓
Authentication
    ↓
Device Features
    ↓
Projects

This tutorial will gradually cover these concepts and help you move from basic React Native development to real-world mobile applications.

📌 Key Points

  • React Native is a framework for mobile application development.
  • It uses JavaScript and React concepts.
  • React Native supports Android and iOS development.
  • Applications are built using reusable components.
  • View, Text, Image and TextInput are common components.
  • Props are used to pass data between components.
  • State is used to manage changing data.
  • Flexbox is commonly used for mobile layouts.
  • Navigation allows users to move between screens.
  • APIs allow mobile applications to communicate with backend servers.

🧠 Quick Quiz

Question: What is React Native mainly used for?