One of these navigation headers is coming from this root navigator stacknavigator, and the other is coming from the main app stack. ![]() Now as you can see, we've got these two navigation headers on top of each other. Our next screen is going to be the modal screen, which is going to be the modal screen that we just defined. Our main app is going to be our main app stack, which is currently what we're rendering. This is also going to be a stacknavigator. ![]() Now to actually render a modal which will bring a screen up from the bottom rather than the right-to-left or left-to-right, which is typical of stacknavigator, we're going to create a new navigator. We can enclose the modal, and we'll handle the onPress once we actually render the screen. Just like our other screens, it's wrapped in safe-area view. The first thing we want to do to set that up is actually create a new screen, which will represent our modal screen. ![]() Each one of these screens has a very simple component wrapped inside a safe-area view with buttons to navigate to the detail screen and then to go to the modal screen. Instructor: Initially, our application is using a stacknavigator to render a home screen as well as a detail screen.
0 Comments
Leave a Reply. |