Lesson 1 of 60 – Introduction to React Native
2%

Introduction to React Native

React Native is a popular framework for building mobile applications using JavaScript and React. It allows developers to create applications for platforms such as Android and iOS using a common development approach.

Note: If you already know JavaScript and React, learning React Native becomes much easier because many React concepts such as components, props, state, hooks and events are also used in React Native.

1. What is React Native?

React Native is a framework for developing mobile applications using JavaScript and React.

It allows developers to build mobile user interfaces using React components and React concepts.

React + JavaScript
        ↓
   React Native
        ↓
 Mobile Applications

2. Who Developed React Native?

React Native was developed by Facebook, which is now known as Meta.

The technology was created to help developers build mobile applications using JavaScript and React concepts.

3. Why Was React Native Created?

Traditionally, developers often needed different technologies and codebases for different mobile platforms.

React Native provides a way to build mobile applications using React and JavaScript while targeting multiple mobile platforms.

4. React Native Uses JavaScript

React Native applications are primarily developed using JavaScript or TypeScript.

For example, a component can be written using JavaScript and React syntax.

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

5. React Native Uses React

React Native is based on React concepts.

If you understand React components, props, state and hooks, you already have an important foundation for learning React Native.

6. React Native Is Used for Mobile Apps

React Native is mainly used to develop mobile applications.

Applications can contain screens, buttons, forms, images, lists, navigation and many other mobile interface elements.

7. Android Applications

React Native can be used to create applications that run on Android devices.

Developers can test applications using Android emulators or physical Android devices.

8. iOS Applications

React Native can also be used to develop applications for Apple's iOS platform.

The same React Native development approach can be used while targeting iOS.

9. Cross-Platform Development

React Native supports cross-platform application development.

This means developers can use a common React Native codebase while building applications for multiple mobile platforms.

10. React Native Components

React Native provides components for creating mobile user interfaces.

Some commonly used components include:

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

11. View Component

The View component is one of the most commonly used React Native components.

It can be used as a container for other components.

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

12. Text Component

The Text component is used to display text in a React Native application.

<Text>Hello World</Text>

Unlike normal HTML development, React Native provides its own components for mobile interfaces.

13. React Native and JSX

React Native uses JSX, which allows developers to describe the user interface using a syntax similar to HTML.

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

14. React Native Is Not HTML

React Native uses JSX syntax, but its components are not normal HTML elements.

For example, React Native commonly uses View and Text instead of HTML elements such as div and p.

15. React Native Styling

React Native provides a styling system for designing mobile interfaces.

The StyleSheet API is commonly used to create styles.

const styles = StyleSheet.create({
    container: {
        padding: 20
    }
});

16. React Native and Flexbox

Flexbox is widely used to arrange components in React Native.

It helps developers create layouts for different mobile screen sizes.

container: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center"
}

17. React Native State

React Native applications can use React state to store changing data.

The useState Hook is commonly used for managing state.

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

18. React Native Props

Props are used to pass data from one component to another.

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

19. Handling User Events

React Native applications can respond to user actions such as pressing buttons or entering text.

<Pressable onPress={() => alert("Hello")}>
    <Text>Click Me</Text>
</Pressable>

20. Forms in React Native

Forms can be created using components such as TextInput, buttons and state.

Forms are commonly used for login, registration, search and data-entry screens.

21. Lists in React Native

Mobile applications frequently need to display lists of data.

React Native provides components such as FlatList and SectionList for this purpose.

22. Navigation Between Screens

Real mobile applications usually contain multiple screens.

Navigation libraries can be used to move between screens such as Home, Profile, Login and Settings.

23. Connecting to APIs

React Native applications can communicate with backend servers through APIs.

Developers can use technologies such as fetch() or Axios to request data from a server.

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

24. React Native and Databases

A React Native application can communicate with a backend API that works with a database.

For example, a PHP and MySQL backend can provide student, course, payment or product data to a mobile application through APIs.

25. Local Data Storage

Mobile applications sometimes need to store information locally on the device.

For example, application preferences or temporary user information can be stored locally using suitable storage solutions.

26. Authentication in Mobile Apps

Many mobile applications require users to log in before accessing private features.

React Native can communicate with an authentication API to implement login, logout and user sessions.

27. React Native Applications Can Access Device Features

Mobile applications may need access to device capabilities such as camera, location, notifications and media.

React Native projects can use suitable APIs and libraries to work with these capabilities.

28. Testing React Native Applications

React Native applications can be tested using emulators, simulators and physical mobile devices.

Testing helps developers identify layout problems, navigation issues, API errors and device-specific problems.

29. What You Will Learn in This Tutorial

In this React Native tutorial, you will gradually learn how to build mobile applications from basic concepts to complete projects.

  • React Native fundamentals
  • Components and props
  • State and Hooks
  • Styling and layouts
  • Forms and validation
  • Lists
  • Navigation
  • APIs
  • Storage
  • Authentication
  • Real-world mobile projects

30. React Native Learning Roadmap

A good learning path for React Native is:

JavaScript
    ↓
React
    ↓
React Native Basics
    ↓
Components & Styling
    ↓
State & Hooks
    ↓
Forms & Lists
    ↓
Navigation
    ↓
APIs
    ↓
Storage
    ↓
Authentication
    ↓
Device Features
    ↓
Real Projects
    ↓
App Deployment

Because React Native is based on React, your existing knowledge of JavaScript and React will be very useful throughout this course.

📌 Key Points

  • React Native is used to build mobile applications.
  • React Native uses JavaScript and React concepts.
  • It supports development for Android and iOS.
  • React Native applications are built using components.
  • Common components include View, Text, Image and TextInput.
  • Props and state are important React Native concepts.
  • Styles and Flexbox are used to create mobile layouts.
  • APIs can connect mobile applications with backend servers.
  • Navigation is used to move between application screens.
  • React Native can be used to create complete real-world applications.

🧠 Quick Quiz

Question: What is React Native mainly used for?