Video není dostupné.
Omlouváme se.

React Native Tutorial #24 - Drawer Navigation

Sdílet
Vložit
  • čas přidán 22. 12. 2019
  • Hey gang, in this React Native tutorial we'll see how to create a navigation drawer so that we can navigate around other screens not in our stack.
    ----------------------------------------
    🐱‍💻 🐱‍💻 Course Links:
    Course files - github.com/iamshaunjp/react-n...
    🐱‍💻 🐱‍💻 Other Related Courses:
    + Complete React Tutorial - • Complete React Tutoria...
    + React Hooks & Context Tutorial - • React Context & Hooks ...
    + Modern JavaScript Tutorial - • Modern JavaScript Tuto...

Komentáře • 155

  • @kevinreynaldo2422
    @kevinreynaldo2422 Před 4 lety +30

    i just learned react native last month just from documentation only and it gets confusing about these react navigation stack thing. Thankfully i just found ur react native videos last day and already watched all of it. Thank you man for making this simple and easy to understand.

  • @ashishsangwan5091
    @ashishsangwan5091 Před 3 lety +1

    I went through so many videos about react native navigation but it was so confusing, then I found your video yesterday and it's a blessing for new learners really. Thank you so much for these videos.

  • @kelseyfecho2896
    @kelseyfecho2896 Před 4 lety +10

    Thank you for this awesome tutorial, you saved me hours and hours of reading/experimenting.

  • @nahom.g.g
    @nahom.g.g Před rokem +3

    The draw Navigator is not working for me, I don't know whether it is because the version conflict

  • @happygreenman
    @happygreenman Před 4 lety

    Thank you ! It was exactly what I needed, and it was easy to adapt your solution to my case. Through this awesome tutorial I undestood more about navigators !

  • @Natokserialcom
    @Natokserialcom Před 4 lety +3

    It just make things so clear, I spent almost 2 days by reading the API docs, and watching and reading different tutorials, But never get clear than this

  • @sunildhaul2397
    @sunildhaul2397 Před 3 lety +2

    Excellent tutorial that is easy to follow due to your detailed and to-the-point explanation.

  • @theweebdev
    @theweebdev Před 4 lety +3

    Can't wait for the next tutorial. Its like waiting for the next season of your favorite show. Happy holiday net ninja!

    • @NetNinja
      @NetNinja  Před 4 lety

      Thanks Justin, you too :)

  • @arwahsapi
    @arwahsapi Před 4 lety

    Thanks, your explanation in all your video series is even clearer than the official docs

  • @kritikasrivastava4978
    @kritikasrivastava4978 Před 3 lety +3

    Your explanation is so clear.Please do more React Native project tutorials.🎉

  • @majdkalthoum5733
    @majdkalthoum5733 Před rokem +3

    I wish you could update this course as most of the stuff are outdated and it's getting really frustrating to keep up with this course and at the same time looking for the right implementation.

  • @matkomilic201
    @matkomilic201 Před 4 lety

    Thank u so much and I can say we all hope for more React Native videos.

  • @cedrickvstheworld1810
    @cedrickvstheworld1810 Před 3 lety +1

    this is my favourite part of the series (as well as the Formik part)

  • @antonio7446
    @antonio7446 Před 4 lety +1

    Spend two days reading docs on react navigation trying to make correct drawer navigation with header. Pity i din't see this videos first, dispite i am your loyal fan. Your tutorials realy very helpfull! Thank you man!
    And I have an idea of future React Native video. Combine this app with Mobx.

  • @saadsheikh27
    @saadsheikh27 Před 4 lety +1

    literally the best channel on the planet 🔥👏

  • @imPriyankCoder
    @imPriyankCoder Před 4 lety

    Happy holiday shawn :) thanks for all your effort

    • @NetNinja
      @NetNinja  Před 4 lety

      Thanks, Happy New Year! :)

  • @yatishkelkar9240
    @yatishkelkar9240 Před 4 lety +2

    Thanks man for such good explanation. Please upload further tutorials of React Native. Also could you include authentication and databases in this tutorial?

  • @Natokserialcom
    @Natokserialcom Před 4 lety +1

    Eagerly waiting for next part

  • @srinivast9328
    @srinivast9328 Před 3 lety

    Thank you very much sir , you provide execellent knowledge in videos and saved a lot of time to me
    good sir

  • @SKaren-lz9sc
    @SKaren-lz9sc Před 4 lety

    I love you Ninja. Great teacher.

  • @guyfromdoon
    @guyfromdoon Před 4 lety +1

    U r the best Teacher 🤞🤞

  • @guymross
    @guymross Před 3 lety

    Thank you so much!

  • @sumanth3036
    @sumanth3036 Před 4 lety +1

    The net ninjaaaa!!! uuuuuuhhhhh!!! Bro please continue videos on RN, animation using re-animated, gestures using gesture-handler. And you may please make videos on minimum native side knowledge required for RN. Love you teaching

  • @AutisticThinker
    @AutisticThinker Před 3 lety

    I love your tutorials. :)

  • @hussamali3148
    @hussamali3148 Před 4 lety

    very help full lecture and kindly explain vue native and comparison it with react native and also share share your personal opinion which is best for android and ios app

  • @Lerndemy
    @Lerndemy Před 3 lety +3

    please make new series on react native

  • @TheMaKaBaY
    @TheMaKaBaY Před 4 lety

    Best teacher ever

  • @francisgg7046
    @francisgg7046 Před rokem

    Thanks, this is helping me create my real estate app

  • @markowiecky
    @markowiecky Před 3 lety +32

    Great course, I wish I started this few monts before. There was few changes in React-navigation and part of your material is outdated. It's very anoying looking for tips or solutions in comment section.
    If someone is looking for working drawer.js file, here is mine:
    import React from 'react';
    import { createDrawerNavigator } from '@react-navigation/drawer';
    import { NavigationContainer } from '@react-navigation/native';
    import { HomeStack } from './homeStack'
    import { AboutStack } from './aboutStack';
    const Drawer = createDrawerNavigator();
    export default function App() {
    return (






    );
    }

    • @nandhakumarhajari2405
      @nandhakumarhajari2405 Před 3 lety +1

      +100 . Can you link the full directory. Most videos are outdated in this playlist

    • @MadhavMalhotra
      @MadhavMalhotra Před 3 lety +1

      Thank you for sharing this!

    • @andressalomon6703
      @andressalomon6703 Před 3 lety +5

      Also if you are using the 6.x version of React Navigation you must install this:
      npm install @react-navigation/drawer react-native-gesture-handler react-native-reanimated
      and add in App on the top:
      import 'react-native-gesture-handler';
      Took me almost an hour to handle all the errors I was getting... Hope it is useful for someone else!

    • @VS257
      @VS257 Před 2 lety +1

      Is it just me or the new drawer already has a hamburger drawer header and the stack header and the drawer header are all on top of each other... How do u have only one header?

    • @osmonkida9250
      @osmonkida9250 Před 2 lety

      @@VS257 yeah mine too

  • @naveengoyal5243
    @naveengoyal5243 Před 4 lety +5

    Thank you for your teachings. Probably this is the best channel in the Universe. I learned Django as well through your channel and its not a channel by the way, "It's an institution" 😃😊✌

    • @NetNinja
      @NetNinja  Před 4 lety +1

      Haha, thanks so much :)

  • @GustavoRichter
    @GustavoRichter Před 3 lety +1

    how to fix the error below?
    Failed building JavaScript bundle.
    Unable to resolve "react-navigation-drawer" from "routes\drawer.js"

  • @newc859
    @newc859 Před rokem

    Excellent tutorial

  • @pranaydas7382
    @pranaydas7382 Před 4 lety +5

    can you implement this tutorial using react navigation v5 ?

  • @arthurrodrigues5382
    @arthurrodrigues5382 Před 2 lety

    Amazing course! Question: how to draw over other apps with a button (like floating action button of Facebook Messenger)? It is possible with expo?

  • @benjaminandoh5781
    @benjaminandoh5781 Před 4 lety

    Thanks for the tutorial but i am getting this error " Unable to resolve "./useValue" from "node_modules
    eact-native-reanimated\src\Animated.jsl ". Any help will be appreciated

  • @mohsol86
    @mohsol86 Před 2 lety

    Thanks alot !

  • @josegoncalves5568
    @josegoncalves5568 Před 3 lety

    Hello again, first of all, thank you very much for the material, it is excellent. I would like guidance so that Home and Review Screen are exclusively Stack and that DrawerNavigation is only shown on About screen

  • @danielstoicamusic
    @danielstoicamusic Před 4 lety +1

    Any chance you might also add authentication and/or database to this app in future videos?

  • @iamdhruvcool
    @iamdhruvcool Před rokem +1

    i faced an issue where there was a conflict in react-navigation-drawer and it's dependency react-native-reanimated , so to fix that you should rename interpolate to interpolateNode in react-navigation-drawer/lib/module/views/Drawer.js and then it should work fine.

  • @BlackSheeeper
    @BlackSheeeper Před 4 lety

    Awesome series!
    My drawer doesn't collapse - whatever i do. Even tho i simply cloned the repo.
    Any ideas?

  • @jzrfht
    @jzrfht Před 4 lety

    Really awesome tutorial. Could you please help? I need to change menu titles but i cant find the way. Any help

  • @imomer
    @imomer Před rokem

    Is there a way to remove the gray ripple effect when you touch the drawer item?

  • @sylvielmna
    @sylvielmna Před 3 lety +4

    React Native 5.x+ changes according to:
    reactnavigation.org/docs/drawer-navigator/
    See comments on the previous videos for other changes.
    # Install the new package
    yarn add @react-navigation/drawer
    # drawer.js
    import React from 'react';
    import {NavigationContainer} from '@react-navigation/native';
    import { createDrawerNavigator } from '@react-navigation/drawer';
    import { HomeStack } from './homeStack';
    import { AboutStack } from './aboutStack';
    const RootDrawerNavigator = () => (


    )
    export const RootDrawer = () =>(

    )
    # aboutStack.js, homeStack.js

  • @BesaAlmahdy
    @BesaAlmahdy Před 4 lety

    Thanks Man :)

  • @baranates6652
    @baranates6652 Před 3 lety +2

    This react native changes too frequently... The createStackNavigator() function doesn't take any arguments now, the video is deprecated :(

  • @Beginnerplaygames
    @Beginnerplaygames Před 3 lety +25

    There is a lot of changes with the v5 API
    I stacked for hours trying to fix the errors. For those who want the code:
    **************
    reviewDetail.js
    **************
    import React from "react";
    import { StyleSheet, View, Text } from "react-native";
    import { roundToNearestPixel } from "react-native/Libraries/Utilities/PixelRatio";
    import { golbalStyles } from "../styles/global";
    export default function ReviewDetails({ route, navigation }) {
    const item = route.params;
    return (
    {item.title}
    {item.body}
    {item.rating}
    );
    }
    **************
    homeStack.js
    **************
    import React from "react";
    import { createStackNavigator } from "@react-navigation/stack";
    // import { NavigationContainer } from "@react-navigation/native";
    import Home from "../screens/home";
    import ReviewDetails from "../screens/reviewDetail";
    const HomeStack = createStackNavigator();
    export default function myStacks() {
    return (


    );
    }
    **************
    aboutStack.js
    **************
    import React from "react";
    import { createStackNavigator } from "@react-navigation/stack";
    // import { NavigationContainer } from "@react-navigation/native";
    import About from "../screens/about";
    const AboutStack = createStackNavigator();
    export default function myStacks() {
    return (

    );
    }
    **************
    drawer.js
    **************
    import React from "react";
    import { createDrawerNavigator } from "@react-navigation/drawer";
    import { NavigationContainer } from "@react-navigation/native";
    import AboutStack from "./aboutStack";
    import HomeStack from "./homeStack";
    const RootDrawerNavigator = createDrawerNavigator();
    export default function App() {
    return (



    );
    }
    **************
    App.js
    **************
    import React, { useState } from "react";
    import { useFonts } from "expo-font";
    import AppLoading from "expo-app-loading";
    import Navigator from "./routes/drawer";
    export default function App() {
    const getFonts = () => {};
    let [fontsLoaded, setFontsLoaded] = useFonts({
    "nunito-regular": require("./assets/fonts/Nunito-Regular.ttf"),
    "nunito-bold": require("./assets/fonts/Nunito-Bold.ttf"),
    });
    if (fontsLoaded) {
    console.log("fonts loaded");
    return ;
    } else {
    console.log("loadingfonts");
    return ;
    }
    }
    Make sure you have the same paths. Otherwise, change it.

    • @baranates6652
      @baranates6652 Před 3 lety

      Thank you mate!

    • @VS257
      @VS257 Před 2 lety +1

      Wouldn't this have both Drawer header and Stack header on top of each other? I have the same code structure but my iOS simulator is showing the Drawer header, but the one in NetNinja doesnt have any Drawer hamburger header but mine does..... How do u have only one Header??

    • @OpGamer-kj4ve
      @OpGamer-kj4ve Před 10 měsíci

      Thank you brother much appreciated because of you i can finally finish this course

    • @unknownstranger8915
      @unknownstranger8915 Před měsícem

      not working

  • @KajuTheRudeMonke
    @KajuTheRudeMonke Před 3 lety

    Hey, quick question: I did drawer exactly like you did in your video. Now, is there any way to apply custom styling to this drawer? The default look doesn't really fit to my project, so I would like to change it. Is there any way to do this or I need to rewrite my drawer completely?
    Thanks in advance.

    • @raihanuddin1167
      @raihanuddin1167 Před 3 lety

      Pls kindly help me my drowmenu show ok but show up then doesn’t to see properly home and about

  • @CodingwithDay
    @CodingwithDay Před 3 lety

    Hi all, First, Thank you very much for the awesome set of tutorials @The Net Ninja. Anyone know how to change the font size of the drawer by any chance. I want them to be bigger.

  • @arhamasif3556
    @arhamasif3556 Před 3 lety

    My drawer doesn't seem to go back to the home page. If we press the back button present in the phone, it goes back to the home page but if I press home on drawer, it doesn't go back. Any help?

  • @ruset-dewss4698
    @ruset-dewss4698 Před 4 lety

    Would very much like to see a series of tutorial videos on RN- Firebase data base examples , You are just Great.... But Please ! some videos on RN Firebase.....

  • @mohammadmoniruzzaman4710

    Your tutorial is awesome. Thanks for this nice tutorial. I guess you use version 4.x navigation. I find 5.x is a bit easier. what do you think?

  • @codecraftjedi
    @codecraftjedi Před 4 lety +1

    Could you please create a video about bottom navigation panel?

  • @oguzhan2393
    @oguzhan2393 Před 3 lety

    ypeError: (0, _reactNativeScreens.useScreens) is not a function. (In '(0, _reactNativeScreens.useScreens)()', '(0, _reactNativeScreens.useScreens)' is undefined) I am gettimg this error?

  • @ademgokce3136
    @ademgokce3136 Před rokem

    I started learning React Native, and struggling to find a well- organized content. Finally, l came across The Net Ninja, even l am follower of his channel. He did not surprised me honestly. He is the best of the best... Just hat off for this gentlemen how he prep the content, how he keep instruction short and clean with amazing wrap of every single video. I respect him a lot because of all.

  • @salahalsamarraaee650
    @salahalsamarraaee650 Před rokem

    thank you

  • @erensrtky
    @erensrtky Před 4 lety +6

    bro could you upload your next tutorials little bit fast :d i cant wait

  • @raihanuddin1167
    @raihanuddin1167 Před 3 lety

    Pls help me how can down navigation home and about when click icon plz help me
    Because don’t see properly home and about navigation

  • @RizaHariati
    @RizaHariati Před 2 lety

    I can't move forward because turns out react-navigation-drawer somehow doesn't work anymore, and I have to learn react-navigation 5 or 6 instead of 4. The difference is to great. But your curriculum is still great, I'm going to just jump to the lessons after navigation.

  • @josegoncalves5568
    @josegoncalves5568 Před 3 lety

    Hello, I am very novice, I have created two initial screens to work with stack without the drawer menu, but now I need that when fulfilling a condition the user goes to a third screen that can handle drawer navigation and can not return to the two initial screens, I do not know if I can explain...

    • @josegoncalves5568
      @josegoncalves5568 Před 3 lety

      Experimenting without conditions, create a third screen on the homestack, which had the and took me to a fourth screen that if I had the drawer navigation, but still had the scroll in the header back to screen two and one

  • @saugaatallabadi
    @saugaatallabadi Před 3 lety +7

    UPDATE: do "npm install react-native-screens" as well (or yarn add react-native-screens)

  • @rialf5373
    @rialf5373 Před 4 lety +2

    thank ninja for all of your tutorial
    but this time I followed your tutorial and there was a problem on me. my page does not appear anything (stuck white) other than the default page
    in console not show some error

    • @sid99varma
      @sid99varma Před 4 lety

      I have the same error! Did anyone get a fix to this??

    • @sambhavjain9566
      @sambhavjain9566 Před 4 lety

      i faced the same issue,but then i realized i had a view tag in homestack.js and aboutstack.js ......remove the view tag and it will work

    • @jaysonlana9147
      @jaysonlana9147 Před 4 lety

      @@sambhavjain9566 i dont have view tag but still white screen

  • @jaysonlana9147
    @jaysonlana9147 Před 4 lety

    Hi i need some help The screen Get stuck in white if i change create app container to Homestack
    EDIT: Now it became an error

  • @sidharthpunathil
    @sidharthpunathil Před 4 lety

    import Home from "../routes/homeStack"; & import Home from "../routes/home"; whats the difference?

  • @kristinaramljak5277
    @kristinaramljak5277 Před 3 lety +3

    The createStackNavigator() function doesn't take any arguments now.
    New drawer.js code:
    import React from 'react';
    import { createDrawerNavigator } from '@react-navigation/drawer';
    import { NavigationContainer } from '@react-navigation/native';
    import HomeStack from './homeStack';
    import AboutStack from './aboutStack'
    const Drawer = createDrawerNavigator();
    export default function App() {
    return (



    );
    }

  • @albirtflonso5688
    @albirtflonso5688 Před 4 lety +1

    I'm really looking forward to see your Sails.js series.
    All the Best.

  • @CelestialCadences
    @CelestialCadences Před 3 lety +2

    *** This is version 4 of react navigation for those who may not know! ***
    It's very important to mention that you are using react navigation v4 ...as a noobie this would throw me off big time and cost me days trying to sort through different examples wondering what is going on.

  • @user-we3kd4yd1o
    @user-we3kd4yd1o Před 4 lety +1

    Hello Shaun, would you please, when you have time, put out a series on Laravel, either on this channel or on Udemy? There are tons of great front-end framework serious here, appreciate it. But I do really want to get into Laravel, especially after taking your PHP/MySQL classes. I tried to find some good Laravel tutorials but a good one is hard to come by. Thank you

    • @NetNinja
      @NetNinja  Před 4 lety

      Hey, probably around the end of January I will doing a Lavarel course :)

    • @user-we3kd4yd1o
      @user-we3kd4yd1o Před 4 lety

      Looking forward to it :)

  • @nikhiljindal4580
    @nikhiljindal4580 Před 4 lety

    I am not able to see the complete name in the drawer , please help

  • @shadmanmartinpiyal4057
    @shadmanmartinpiyal4057 Před 4 lety +3

    Hey gang.... currently I am facing a problem with 'npm'... so the rule of thumb is when you are gonna install something related to react-native, use "expo" to install it.... for example.... use "expo install react-navigation-drawer" instead of npm install.... it saved me from error and it will automatically save it in your dependencies unlike npm when you need to write "--save" to save it in dependency

    • @rajeevbhosle1580
      @rajeevbhosle1580 Před 3 lety

      thank you...

    • @iforce2d
      @iforce2d Před 2 lety

      Using expo for this just redirects to npm when I tried it.

    • @shadmanmartinpiyal4057
      @shadmanmartinpiyal4057 Před 2 lety

      @@iforce2d oh.... I quit react-native years ago... forgot everything I knew about expo

  • @likithsai13
    @likithsai13 Před 3 lety

    Does this drawer navigation works on iOS 🤔

  • @abhisheknautiyal5446
    @abhisheknautiyal5446 Před 3 lety

    I did the same you have done in the video but i got an error of. Interpolate is not a function.. Please help.. Help will be highly appreciated.

    • @adivmt
      @adivmt Před 2 lety +1

      The drawer code is old

  • @simdanofficial
    @simdanofficial Před 4 lety +1

    Didn't work for me. Header showing and default home showing but when i try to drag the menu nothing comes out

    • @molmedito
      @molmedito Před 4 lety

      This worked for me: software-mansion.github.io/react-native-gesture-handler/docs/getting-started.html

  • @revansarbast5478
    @revansarbast5478 Před 3 lety +1

    navigation drawer is not working with me any one can help
    17:31
    AppLoading threw an unexpected error when loading:
    TypeError: interpolate is not a function. (In 'interpolate(this.progress, {
    inputRange: [PROGRESS_EPSILON, 1],
    outputRange: [0, 1]
    })', 'interpolate' is undefined)
    Stack trace:
    node_modules
    eact-native\Libraries\LogBox\LogBox.js:148:8 in registerError
    node_modules
    eact-native\Libraries\LogBox\LogBox.js:59:8 in errorImpl
    node_modules
    eact-native\Libraries\LogBox\LogBox.js:33:4 in console.error
    node_modules\expo\build\environment
    eact-native-logs.fx.js:27:4 in error
    node_modules\expo-app-loading\build\AppLoading.js:11:12 in startLoadingAppResourcesAsync._catch$argument_0
    node_modules
    eact-native
    ode_modules\promise\setimmediate\core.js:37:13 in tryCallOne
    node_modules
    eact-native
    ode_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0
    node_modules
    eact-native\Libraries\Core\Timers\JSTimers.js:130:14 in _callTimer
    node_modules
    eact-native\Libraries\Core\Timers\JSTimers.js:181:14 in _callImmediatesPass
    node_modules
    eact-native\Libraries\Core\Timers\JSTimers.js:441:30 in callImmediates
    node_modules
    eact-native\Libraries\BatchedBridge\MessageQueue.js:387:6 in __callImmediates
    node_modules
    eact-native\Libraries\BatchedBridge\MessageQueue.js:135:6 in __guard$argument_0
    node_modules
    eact-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
    node_modules
    eact-native\Libraries\BatchedBridge\MessageQueue.js:134:4 in flushedQueue
    [native code]:null in flushedQueue
    [native code]:null in callFunctionReturnFlushedQueue
    ...

  • @khriss327
    @khriss327 Před 4 lety

    "Cannot read property 'configureProps' of undefined", i can't solve this

    • @alicjamruk8446
      @alicjamruk8446 Před 4 lety

      use react native v5 navigator: pass {route} then const item = route.params;

  • @jamalxd5647
    @jamalxd5647 Před rokem

    CAN WE Use Drawer Navigation and Stack Navigation together?

  • @BeatBustersDance
    @BeatBustersDance Před 3 lety

    Sir please make another course for react Native bcz this one is out dated and can't find a better resource on CZcams. And If possible plz connect a react native app with Firebase

  • @ahmetbcakici
    @ahmetbcakici Před 4 lety +9

    i solved all problems about nesting navigators with React Navigation package 5.x version:
    github.com/ahmetbcakici/ReactNativeReviewApp
    this repo can help you with solving problems, because the structure changed some

    • @eduardoocrespo1875
      @eduardoocrespo1875 Před 4 lety

      thank you, it was similar to mine, hope it doesn't cause any problems later

    • @eduardoocrespo1875
      @eduardoocrespo1875 Před 4 lety

      in your aboutStack.js file, you have
      ""
      change "component={Home}" to "component={About}"
      that way you can use the consistent routes import in your drawer.js file "import About from '../routes/aboutStack';"

    • @sidharthpunathil
      @sidharthpunathil Před 4 lety

      thanks!

    • @furkanaydogan821
      @furkanaydogan821 Před 4 lety

      you saved my projects .Thank you :)

    • @muralikrishna9072
      @muralikrishna9072 Před 4 lety

      Thank you...! Ahmet

  • @jaysonlana9147
    @jaysonlana9147 Před 4 lety

    Hi to anyone I need some Help is there anyone know how why there is error when i change my
    export default createAppContainer(HomeStack) to expoert default Homestack

    • @thesage86
      @thesage86 Před 4 lety +1

      It is due to in React Navigation 5 we do not use Higher Order component to wrap Navigation
      Refer Documentation example
      It helps a lot
      reactnavigation.org/docs/drawer-based-navigation/

    • @jaysonlana9147
      @jaysonlana9147 Před 4 lety

      @@thesage86 the sample doesnt work for me i also open it in expo.io but still dont load

    • @thesage86
      @thesage86 Před 4 lety

      @@jaysonlana9147 Try this I did it according to documentation
      // ! Configuring Stack Navigator
      //import { createStackNavigator } from 'react-navigation-stack';
      //import { createStackNavigator } from '@react-navigation/stack';
      // import { createAppContainer }from '@react-navigation/native';
      import React from 'react';
      //import { NavigationContainer } from '@react-navigation/native';
      import { createStackNavigator } from '@react-navigation/stack';
      import Home from '../screens/Home';
      import ReviewDetails from '../screens/ReviewDetails'
      import Header from '../Shared/Header'
      const HomeStack = ({navigation}) => {

      const Stack = createStackNavigator();
      return (
      Styles the back button
      headerTitleStyle: {
      fontWeight: 'bold',
      fontSize: 20,
      },
      }}>

      {/* // ! Whatever is first here will be shown as default Home screen so place ur HomeScreen on Top always */}


      }}
      />




      )
      }
      export default HomeStack;

  • @prafulrane3591
    @prafulrane3591 Před rokem

    What should I do next
    Can you make a pathway video to know how should we follow your playlist from your channel for every technology covered on your channel?

  • @crazystuff1041
    @crazystuff1041 Před 3 lety

    showing error:
    interpolate() was renamed to interpolateNode() in Reanimated 2. Please use interpolateNode() instead

  • @realtorBG
    @realtorBG Před 3 lety +2

    npm install @react-navigation/drawer this is in new version

  • @caiobarrososousa
    @caiobarrososousa Před 4 lety

    i'm doing this on 2020 , it works fine , but i can't swipe (right and left) , i dont know why

    • @amyra98
      @amyra98 Před 4 lety +2

      try this one github.com/react-navigation/react-navigation/issues/7536#issuecomment-540667009

    • @omeraydemir472
      @omeraydemir472 Před 4 lety

      @@amyra98 Thank you so much it worked for me

  • @ahmaddawood9691
    @ahmaddawood9691 Před 2 lety

    GOD Bless you .... E X C E L LE N T

  • @obitoAkaTsUkIo45
    @obitoAkaTsUkIo45 Před 3 lety

    Hello, I had issues on Drawer using sdk version 40, screen was not responding when I navigate and go back to home screen.
    To solve this I had to implement a customDrawerContent and reset navigation every time I go back to home screen, I am posting this just in case it's useful to anyone else:
    import React from "react";
    import {View, TouchableOpacity, Text } from 'react-native';
    import { createDrawerNavigator } from "@react-navigation/drawer";
    import { MainStackNavigator, AboutStackNavigator } from "./stackNavigator";
    function DrawerContent({navigation}) {
    const navigate = (path) => {
    navigation.navigate(path);
    if(path === 'Home') {
    navigation.reset({
    index: 0,
    routes: [{ name: 'Home' }],
    });
    }
    }
    return (

    navigate('Home')} >
    Home

    navigate('About')} >
    About

    );
    }
    const Drawer = createDrawerNavigator();
    export const DrawerNavigator = () => {
    return (
    } >

    );
    }

  • @afro_habesha
    @afro_habesha Před rokem

    Hey Ninja

  • @alirezahadipour1753
    @alirezahadipour1753 Před 3 lety

    I got this error, any idea how can I fix it?
    "Reanimated 2 failed to create a worklet, maybe you forgot to add reanimated babel plugin"

    • @masnoonmulla559
      @masnoonmulla559 Před 3 lety

      HI, i have same error how did you resolve this error.

  • @muhammadsiddiqui9522
    @muhammadsiddiqui9522 Před 2 lety

    4:15
    Correction: Copy all of this "because I'm so lazy"....😁

  • @balkrushnawalke4371
    @balkrushnawalke4371 Před 4 lety

    I am getting warning as: WARN %s: Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release. ReactNativeFiberHostComponent
    What should I do??

  • @Lerndemy
    @Lerndemy Před 3 lety +6

    Those who are facing problem with latest version - Enjoy !
    ------------------------------------------------------------------
    Drawer.js
    import * as React from "react";
    import { createDrawerNavigator } from "@react-navigation/drawer";
    import { NavigationContainer } from "@react-navigation/native";
    import Home from "../screens/Home";
    import About from "../screens/About";
    import homeStack from "./homeStack";
    import aboutStack from "./aboutStack";
    const Drawer = createDrawerNavigator();
    export default function Navigator() {
    return (






    );
    }
    ------------------------------------------------------------------
    aboutStack.js
    import * as React from "react";
    import { View, Text } from "react-native";
    import { NavigationContainer } from "@react-navigation/native";
    import { createStackNavigator } from "@react-navigation/stack";
    import About from "../screens/About";
    const Stack = createStackNavigator();
    function aboutStack() {
    return (






    );
    }
    export default aboutStack;
    ------------------------------------------------------------------
    homeStack.js
    import * as React from "react";
    import { View, Text } from "react-native";
    import { NavigationContainer } from "@react-navigation/native";
    import { createStackNavigator } from "@react-navigation/stack";
    import Home from "../screens/Home";
    import ReviewDetails from "../screens/ReviewDetails";
    const Stack = createStackNavigator();
    function homeStack() {
    return (





    );
    }
    export default homeStack;
    ------------------------------------------------------------------
    App.js
    import React, { useState } from "react";
    import AppLoading from "expo-app-loading";
    import { useFonts } from "expo-font";
    import Navigator from "./routes/Drawer";
    export default function App() {
    let [fontsLoaded] = useFonts({
    Nunito: require("./assets/fonts/Nunito-Regular.ttf"),
    Nunito_Bold: require("./assets/fonts/Nunito-Bold.ttf"),
    });
    if (!fontsLoaded) {
    return ;
    } else {
    return ;
    }
    }
    ------------------------------------------------------------------
    package.json
    {
    "main": "node_modules/expo/AppEntry.js",
    "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
    },
    "dependencies": {
    "@expo-google-fonts/inter": "^0.1.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/drawer": "^5.12.5",
    "@react-navigation/native": "^5.9.4",
    "@react-navigation/stack": "^5.14.5",
    "expo": "~41.0.1",
    "expo-app-loading": "^1.0.3",
    "expo-font": "~9.1.0",
    "expo-status-bar": "~1.0.4",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-reanimated": "~2.1.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "^3.0.0",
    "react-native-web": "~0.13.12",
    "react-navigation": "^4.4.4",
    "react-navigation-stack": "^2.10.4"
    },
    "devDependencies": {
    "@babel/core": "^7.9.0"
    },
    "private": true
    }

  • @80Vikram
    @80Vikram Před 3 lety

    In India we pronounce "Draweeerrr" to differentiate between "Draw" and "Drawer", british people pronounce same thing for both words. Britishers have made English language hard to learn LOL

  • @user-qh1qe8of5b
    @user-qh1qe8of5b Před 7 měsíci +3

    *Update* 2023
    Install package- npm install @react-navigation/drawer
    npx expo install react-native-gesture-handler react-native-reanimated
    In App.js -
    First line of the file - import 'react-native-gesture-handler';
    Then in drawer.js -
    import 'react-native-gesture-handler';
    import React from 'react';
    import { createDrawerNavigator } from '@react-navigation/drawer';
    import { NavigationContainer } from '@react-navigation/native';
    import HomeNavigation from '../routes/homestack';
    import AboutNavigation from '../routes/aboutstack';
    const Drawer = createDrawerNavigator();
    export default function Navigator() {
    return (



    );
    }
    If you are getting some weird errors - like Invariant Violation or something. Add this line in babel.config.js -
    module.exports = function(api) {
    api.cache(true);
    return {
    presets: ['babel-preset-expo'],
    plugins: ['react-native-reanimated/plugin'], //

    • @KhannLyHoutHap
      @KhannLyHoutHap Před 7 měsíci

      can you provide aboutstack.js ?

    • @Cardonfamily
      @Cardonfamily Před 5 měsíci

      My files look identical to yours, but I'm getting the following 2 errors. Any ideas?? (Yes, I'm opening from the correct folder. Also name is the same in app.json and package.json)
      ERROR Error: Exception in HostFunction: expected 0 arguments, got 1,
      ERROR Invariant Violation: "main" has not been registered. This can happen if:
      * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
      * A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.,

    • @firststrandtypename1866
      @firststrandtypename1866 Před 5 měsíci

      @@Cardonfamily did you manage to solve it yet though?

    • @Cardonfamily
      @Cardonfamily Před 5 měsíci +1

      @@firststrandtypename1866 Nope

    • @talha-safdar
      @talha-safdar Před 15 dny

      Mate learn English first, and then learn to provide concise explanations, the use of dots at the end doesn't make any sense.

  • @layhoutchea3341
    @layhoutchea3341 Před 2 lety +1

    this vid is completely outdated. for new students, please go read the docs.

    • @Arcanita
      @Arcanita Před 2 lety +2

      i realize that after 2 days working with this video uwu