Hi, and welcome back.
Today, we're going to be talking about Stack Navigation in React Native.
Stack navigation is a powerful tool
that allows you to create multiple pages within your React Native app.
It works by stacking the different pages
on top of each other, so you can easily navigate between them.
But why would you want to use stack navigation in your app?
Well, it's simple.
With stack navigation,
you can create a seamless and intuitive user experience for your users.
No more confusing navigation or losing track of where you are in the app.
With the Stack Navigation,
you can easily keep track of your pages and navigate between them with ease.
Now let's get started with installing
the Stack Navigator for our social media project.
Here we're just going to open up this menu
and then let's go to Navigators and click on Stack Navigator.
This link will be also placed inside
the Resources folder, so you can always use that.
Here you have a display of how the Stack Navigator actually works, which is great.
You can really see that you get the back button feel.
For example, for iOS and Android, you can always slide from left to right
to go back, and gestures are automatically coming with the Stack Navigator.
Let's just start with the installation process.
Please, if you're running on Windows,
again, quit all your command props, quit all your Metro bundlers,
and let's just get started with installing these items.
First, we're going to need to install
this, so just copy it and place it right here and wait for it to complete.
Again, we're not using Expo, so we're not going to use this command.
We're going to use the Bear React native project.
Let's just copy this line right here
and install the gesture handler and let's wait for this to complete as well.
Here it says that if we want to complete
the installation of the React native gesture handler,
we're going to have to add this line at the top of our application.
It's either going to be an index.js or app.js file
let's just go to index.js file, actually,
and let's make sure that we import it as a first thing right here and save it.
Then we don't need the expo installation
here anymore and we are going to use the masked view.
Let's just copy this as well.
Open up our terminal, paste it, and wait for it to complete.
If you're on macOS, again, you're going to have to install the pods.
Windows users don't ever do it.
Just install the pods if you're on macOS and wait for this to complete.
That's all.
In the next video, we're actually going to start to use the Stack Navigator.
We are not going to set it up in this video.
So if you're interested on how to create Stack Navigators and how to use
the navigation system, please come back to the next video.
Thank you so much for watching and I'll see you there.