React Native
About Lesson

In this React Native lesson we are going to learn about React Native Class Component, as i have already said that components are the building blocks of a React Native application, for example you have an application, and you have screens like login screen, registration screen and profile screen, now you can create separate components for these screens, you can create as many as components you want, also there are two types of components that you can use. we have functional component and class component, we have already saw that how you can create functional component.

 

 

So class components are basically JavaScript ES6 classes that extends from React Component, now let’s create our class component, i have given the name of HelloClass.js for my class component, you can see that our class extends from React Component, also we have some Text component and styles for our Text.

 

 

 

This is our App.js file and we have added the newly created component in our App.js, make sure that you have import the component at the top.

 

 

 

Run this command to start your metro bundler.

 

 

After that run your application from metro bundler.

React Native Class Component
React Native Class Component