At this point, we have definitely mastered it, class based components.
We understand the state system, we understand life-cycle methods and so on.
So now we're going to start to move ahead and discuss the hoax system in the world of react, the hoax
system, you might recall.
It's kind of a logical mess.
Next step after understanding class components.
So we really went through all that class component stuff, not only because you need to understand class
components, but also because, well, it makes a lot easier to understand the whole system.
Let's have a quick overview of what hooks are all about.
So in the world of react, the hoax system is all about giving function components.
A lot of additional functionality.
As we have discussed, Function Koenen so far throughout this course, we have said that they could
not make use of state or life-cycle methods and so on the hook system is all about changing that with
the hook system.
React gives us functions called things like use state use effect, use RF.
These are all functions and each of them give additional functionality to a function component.
For example, the use state function allows us to make use of state in a functional component.
Now, when I say make use of state, I mean that we're going to have similar functions to that set state
function that we've learned about quite a bit.
With use effect, we get access to something like or something very similar to lifecycle methods and
a function component.
And finally with Use RF.
This is also a function and allows us to create a ref or a reference to a particular element that is
created by react.
These are all functions.
Everything in the hook system, all functions.
So we need to understand what each of these different functions do and how we make use them.
Now, as we start to discuss the hook system in general, a lot of the different concepts are going
to go over are going to seem a little bit complicated and maybe more complicated than necessary.
At the end of day, what I really want you to understand is that hooks are all about giving you tools
to write reusable code.
It's not about having fancy syntax.
It's not about necessarily making react easier to work with.
It's definitely not about somehow building out something better than class components.
Instead, it is just about helping you write reusable code.
And we're going to use this technique of the hook system rather than relying upon more classic techniques
such as object oriented programming or inheritance or anything like that.
With a hook system, we get a collection of different functions that we might refer to as primitive
hooks.
Now just, you know, react doesn't actually call these primitive hooks.
It's a term that I'm applying to this.
Just help you understand what these are all about.
These are 10 functions that are included with react to give more functionality to function components.
They each serve a very specific purpose.
We'll take a look at a majority of them over time.
To get started with hooks, we're going to understand how each of these different functions work and
how we make use of them.
But then eventually we're going to make use of these primitive hooks to write our own custom hooks.
A custom hook is a piece of code that does one very repeatable or task, little chunk of code that we
want to make as reusable as possible inside of a custom hook.
We're going to reuse some of the different primitive folks that are given to us from react.
So, for example, if you and I try to make a custom hook called something like use translate inside
of there, we would make use of maybe use state and use effect, which are to primitive folks provided
by react itself.
All right.
Now, this point, not a lot of information, but hooks.
Chances are they still seem really confusing, ballistic.
Paul's right here.
The next video, we're going to start to discuss the application we're going to build to better understand
what hooks are in how to use them.