WEBVTT

1
00:00:00.720 --> 00:00:03.660
Hi and welcome to this video
on React Native tutorial.

2
00:00:03.690 --> 00:00:05.300
This section is made for anyone

3
00:00:05.330 --> 00:00:09.660
who doesn't have any experience in react
and has never used functional components.

4
00:00:09.680 --> 00:00:11.260
So if you don't know what hooks are

5
00:00:11.280 --> 00:00:13.740
and you've never used it,
then this section is for you.

6
00:00:13.770 --> 00:00:16.860
Otherwise, just feel free
to skip this section.

7
00:00:16.880 --> 00:00:21.180
So now let's talk about functional
components and class based comments.

8
00:00:21.210 --> 00:00:23.300
We're going to be discussing why we might

9
00:00:23.330 --> 00:00:27.260
want to use functional components and what
kind of functions come with them.

10
00:00:27.290 --> 00:00:31.620
Functional components are the simplest
way to create a react native component.

11
00:00:31.650 --> 00:00:35.980
They're defined as a JavaScript function
that returns a react native component.

12
00:00:36.000 --> 00:00:39.260
And functional components
are lightweight and fast.

13
00:00:39.290 --> 00:00:41.620
They're easy to test and debug.

14
00:00:41.650 --> 00:00:45.700
They're also easier to understand
and write than class based components.

15
00:00:45.730 --> 00:00:49.060
So this makes it a great
choice for beginners.

16
00:00:49.090 --> 00:00:53.540
Class based components are defined as
class that extends the react component

17
00:00:53.570 --> 00:00:57.740
class, and they allow
for including lifecycle methods.

18
00:00:57.770 --> 00:01:02.700
So if you're needing a lifecycle method,
then you could use class based components,

19
00:01:02.730 --> 00:01:08.020
but also you could replace the lifecycle
methods using hooks in React Native.

20
00:01:08.050 --> 00:01:13.100
And we are going to be discussing
this at the end of our section.

21
00:01:13.130 --> 00:01:14.800
So functional components come

22
00:01:14.830 --> 00:01:18.660
with a number of built in functions
that can help us with building our apps.

23
00:01:18.690 --> 00:01:23.540
This includes hooks such as Use State,
Use Effect, Useref and more.

24
00:01:23.570 --> 00:01:27.660
They allow us to add state and side
effects to our components.

25
00:01:27.690 --> 00:01:30.100
In conclusion,
functional components and class based

26
00:01:30.130 --> 00:01:33.540
components are both important tools
for building React native apps.

27
00:01:33.570 --> 00:01:35.820
In upcoming videos for this section,

28
00:01:35.850 --> 00:01:40.260
we'll dive deep into exploring how
functional components can help us build

29
00:01:40.290 --> 00:01:43.260
better apps and what kind
of functions come with them.

30
00:01:43.280 --> 00:01:45.520
Thank you for watching and see
you in the next video.

