Learn Expo Router - Complete Tutorial

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • 🚀 Project React → cosden.solutio...
    📥 Import React (Newsletter) → cosden.solutio...
    Join The Discord! → discord.cosden...
    Source Code → github.com/cos...
    VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace"
    In this video we will learn about Expo Router in React Native. Expo Router is a file-based routing solution for React Native that's built on top of React Navigation. It provides an easy way to handle routes in your React Native applications and offers a wide range of features such as Stack Navigators, Bottom Tabs Navigators, and so much more!

Комментарии • 148

  • @cosdensolutions
    @cosdensolutions  5 месяцев назад +3

    Hope you enjoyed the video! I also have a really cool and unique course that will teach you way more than this video. You'll learn how to build an actual complex project with React. It's called "Project React" and you can find it at cosden.solutions/project-react. Also, I have a free weekly newsletter called "Import React" with tutorials, news, and cool stuff about React! You can sign up at cosden.solutions/newsletter?s=ytc

  • @ROVAKAN
    @ROVAKAN 8 месяцев назад +14

    i zapped almost 50 tutorial videos on youtube. And this is the video that i need. It's like an answer from a friend. Straight to the point.

    • @cosdensolutions
      @cosdensolutions  8 месяцев назад +2

      glad you found it useful!

    • @Yaw_Dev
      @Yaw_Dev 4 месяца назад +1

      I totally agree. Same here. I'm like finally someone simply explained what the heck is going on. I like how he goes straight to the point. That's how you get Fellow, Like, Save and all the above. Cosden, thanks for making this video.

    • @serdar.d
      @serdar.d 3 месяца назад +1

      SAME!

    • @ROVAKAN
      @ROVAKAN 3 месяца назад

      @@serdar.d kolay gelsin kanka :)

    • @serdar.d
      @serdar.d 3 месяца назад +1

      @@ROVAKAN 😄😄 eyvallah hocam sana da

  • @prashlovessamosa
    @prashlovessamosa 9 месяцев назад +31

    Can you please make more react native stuff please.

    • @cosdensolutions
      @cosdensolutions  9 месяцев назад +9

      Yes will do ☺️

    • @GolderiQ
      @GolderiQ 5 месяцев назад

      @@cosdensolutionsit’s been for months 🥲
      Do you use Apple silicon? How well does it all work with Expo, React native, etc..?

  • @thejahbroda
    @thejahbroda 5 месяцев назад +1

    Started building out mobile apps from my day 2 of learning react native. What gave me the advantage was my grounded know how of reactjs. Seeing this video just gives me the knowledge I need to handle navigations with expo

  • @c4346
    @c4346 7 дней назад

    Your explanations were very straightforward, now I understand the basics, thank you!

  • @nitsanbh
    @nitsanbh 8 месяцев назад +2

    Folder-based routing is a GAME CHANGER

  • @matkomilic8382
    @matkomilic8382 2 месяца назад

    Went from React Navigation to Expo Router today and this tutorial totally got me going, thanks!

  • @Coco-ii2pu
    @Coco-ii2pu 23 дня назад

    I cannot explain how grateful I am. Thank you ❤

  • @Lykkos29
    @Lykkos29 9 месяцев назад +5

    Thanks for this!, I will check it later, just letting you know your explanation and code snippets are super understandable 💯🤙

  • @danielflorencio9661
    @danielflorencio9661 9 месяцев назад +4

    More React Native and Expo, please! 👀

  • @nurammarnaufal7351
    @nurammarnaufal7351 2 месяца назад +1

    its such a wonderful tutorial. but i realize one thing that when we start using tabs the animation transition between stacks is gone, why?

  • @DatDat59
    @DatDat59 9 месяцев назад +1

    I follow you because I know more react native than react js, this is so cool to see a react native video !

    • @cosdensolutions
      @cosdensolutions  9 месяцев назад +1

      Will do more of them ☺️ I'm also a rn dev

  • @ramblingsofadegenerate1174
    @ramblingsofadegenerate1174 2 месяца назад

    Best tutorial yet !!!!!!!!!!! I just got started with dev your tutorial is truly the best man

  • @Smongo412
    @Smongo412 4 месяца назад +2

    Long time react native dev here.
    1. When things work, be thankful, but skeptical.
    2. When things don't work, turn off and on again

    • @JohnWickXD
      @JohnWickXD 4 месяца назад

      Could you please help me 👀 I am getting "cannot read property 'useMemo' of null error and app doesn't work (although before changing the package.json, it was working!)

    • @Smongo412
      @Smongo412 4 месяца назад

      @@JohnWickXD do you use git? Can you go back to before you made the change? Did you remove some package and run npm install? It means you are calling useMemo on something that is null.

  • @irontarkus9701
    @irontarkus9701 2 месяца назад

    thank you very much, this is way better than the official documentation

  • @renekutter7562
    @renekutter7562 9 месяцев назад +2

    Hey, good tutorial, but I would have liked a little more on the topic of nesting. I keep trying to create a tab navigation where a screen contains a stack navigation. However, the stack navigation menu items should not be displayed in the tab navigation. In the navigation tab there should be a “Settings” tab in which several menu items are displayed. I would be super grateful if you could explain this briefly, because I can't find anything about it on the internet.

    • @cosdensolutions
      @cosdensolutions  9 месяцев назад

      Yeah I totally get it, but this was meant to be a beginner tutorial to teach the basics. However, it shouldn't be too difficult to have a stack of screens as one of the tabs. Try replacing in my example code the home screen with a stack and give it 2 screens and see how it behaves. I'm 100% sure you can figure it out without too much trouble :D

  • @AlfredoFerreiras
    @AlfredoFerreiras Месяц назад

    you just made a new subscriber, thank you

  • @valeriysergeyev5766
    @valeriysergeyev5766 25 дней назад

    very informative and straightforward tutorial, thank you!

  • @SayheeKim-m1k
    @SayheeKim-m1k 2 месяца назад

    thanks! first time learning mobile and this was something I really needed to learn

  • @czuka1520
    @czuka1520 8 месяцев назад

    This is my ultimate Expo Router tutorial! Thanks so much for making this!

  • @Noone-bb5qh
    @Noone-bb5qh 8 месяцев назад

    Thank you so much brother for this video. You made me understand the navigation so easily, which other blogs made so hard to understand. Thank you!

  • @kratos-oi7sz
    @kratos-oi7sz 9 месяцев назад +2

    A video on how to setup a turborepo with expo and nextjs please 🤞🤞

  • @_SABARIVASANS-cy7qw
    @_SABARIVASANS-cy7qw 5 месяцев назад

    This video was really helpful and gave me a better understanding of the router. Thanks and keep making good content

  • @shaz101
    @shaz101 5 месяцев назад

    I used the "npx create-expo-app@latest --template tabs@50" recommended by expo and got completely screwed but this tutorial explained everything SO WELL!
    THANK YOU!!!

  • @nehat786
    @nehat786 9 месяцев назад

    Sir we badly expect a react native from you. The way you explain is awesome.

  • @MrAlao675
    @MrAlao675 9 месяцев назад

    This is awesome ❤.
    For a user of nextjs... You covered the whole React Native in less than 25 minutes.
    I have to save this for later.

  • @deepmistry3114
    @deepmistry3114 5 месяцев назад

    Crystal clear description. Thanks a lot!

  • @Ndunda_Kelvin
    @Ndunda_Kelvin 2 месяца назад +1

    Thank you, you explain really well.

  • @abubokor6853
    @abubokor6853 4 месяца назад

    This is the what i actually need.
    Thank You SIr.

  • @uhN0id
    @uhN0id 3 месяца назад

    Just a heads up, if you're on Expo SDK 50 or higher you no longer need to make the babel config change. It's all merged into the existing babel-preset-expo.

  • @FriendsExplanation
    @FriendsExplanation 4 месяца назад

    You just made my day 🌼. Thank for the video. It is helping junior developers like me.

  • @emmanueloni2147
    @emmanueloni2147 8 месяцев назад

    Thank you for this. It was really explanatory and simple to learn, now the docs makes sense 😁. Weldone 👍👍

  • @DorgadoPlays1
    @DorgadoPlays1 5 месяцев назад +1

    Thank you very much bro! helped me to resolve a problem in my App

  • @richardstimson9707
    @richardstimson9707 Месяц назад

    Great tutorial - new subscriber 👍

  • @serdar.d
    @serdar.d 3 месяца назад

    This is the simplest and the smoothest explanation of the Expo Router. Thank you 🙏🏼

  • @jijieats
    @jijieats 9 месяцев назад

    Loved this tutorial! I would really love more react native tutorials! Keep it up

  • @abelgonzalez41
    @abelgonzalez41 Месяц назад

    Thank you so much for this so useful tutorial

  • @joaquinrodriguez7100
    @joaquinrodriguez7100 5 месяцев назад

    Nice tutorial, it was really clear to me. Thank you!

  • @LewraAzad
    @LewraAzad 6 месяцев назад

    Thanks for the tut and love the way you say router!!

  • @SamtheSWE
    @SamtheSWE 3 месяца назад

    Thank you so much for this video!

  • @rukacruxer1474
    @rukacruxer1474 6 месяцев назад

    best tutorial on expo router 👏

  • @bugrakaraaslan8556
    @bugrakaraaslan8556 6 месяцев назад

    exactly what I was looking for, Thanks!

  • @50kT
    @50kT 5 месяцев назад +1

    Problem with tabs is it seems to take away the animation too

  • @hardheart3336
    @hardheart3336 2 месяца назад

    Thanks for this video! ❤❤❤

  • @ronallan8680
    @ronallan8680 8 месяцев назад

    Hey that was Great dude! Really clear and succinct.
    Thnams!

  • @yucanli2957
    @yucanli2957 5 месяцев назад

    amazing tutorial! Wondering would you like to share some of your extension used in vsc? I found the autofill function is very useful!

  • @gaddp
    @gaddp 5 месяцев назад

    super helpful. thanks!!

  • @felipecabreira4321
    @felipecabreira4321 9 месяцев назад

    Love your videos man ! Great tutorial

  • @lucdina5118
    @lucdina5118 5 месяцев назад

    The problem I have with expo router is for ex I wanted to stay on index page and navigating through the details page but the issue is, expo creates automatically a new item on bottom tabs and I don’t really want this behavior.

  • @Juju-ch5it
    @Juju-ch5it 3 месяца назад

    Is it possible to have a LEFT & RIGHT drawer nav on one screen using expo router? I haven't seen anyone make a video on that yet

  • @mariusbora4470
    @mariusbora4470 7 месяцев назад

    very good and useful info, thank you for making this tutorial!

  • @rolloooo
    @rolloooo 5 месяцев назад

    Hey man, is there a way to have two sets of tabs and screens to be swapped via Firebase authentication. Like if user is authenticated, it would swap to a different set of tabs. Great tutorial btw! Cleared out many things for me

  • @jameshizon4861
    @jameshizon4861 15 дней назад

    i got stuck on having more than one tab (4 or 5 tabs) based on default expo tabs to work with from main tutorial.
    Also issue with using Expo and LinearGradient which may not be available on Expo... how you come across this or similar?
    Thanks.

  • @MJ-vx5cz
    @MJ-vx5cz 9 месяцев назад +1

    Please make more advanced react native videos

  • @SuperPlex99339
    @SuperPlex99339 5 месяцев назад

    When I use the expo router I am unable to make the status bar translucent. It always shows.

  • @vinitjain7
    @vinitjain7 2 месяца назад

    i want group tabs how to do that.. like home can have multiple navigations not necessarily tabs..

  • @brawnie3969
    @brawnie3969 3 месяца назад

    thanks for the video.

  • @user-pk4ni3tv7l
    @user-pk4ni3tv7l 6 месяцев назад

    you the Goat

  • @amahdavid3476
    @amahdavid3476 4 месяца назад

    I'm having an issue where i am trying to navigate between my onboarding, login and signup screen, when I reach the last view and try to navigate back, my ios simulator crashes but the code builds fine

  • @freeinformation7877
    @freeinformation7877 5 месяцев назад

    Thank you so much, I really appreciate it.

  • @msrajawat298
    @msrajawat298 4 месяца назад

    I am working on expo router trying to develop android application. During development I Observe that if I am creating any new file it is showing in menu, like if I am using tab navigation using expo router and created a new file which is showing as menu in bottom tab. Similarly in drawer menu also.
    Can anyone help me how I can fix that issue ?
    However maybe it is default behaviour of expo router but I don't want to show each file in menu.

  • @LetalisLatrodectus
    @LetalisLatrodectus Месяц назад

    Is it possible to use Expo Router without default exports? I dislike default exports and have a eslint rule to disable them completely.

  • @nfaical3
    @nfaical3 9 месяцев назад

    Thanks 👍, hope you make more tutorials.

  • @Eros-001-cgi
    @Eros-001-cgi 5 месяцев назад

    thanks man you helped me a lot :)

  • @syeedimtiaz2974
    @syeedimtiaz2974 3 месяца назад

    Please complete the playlist !

  • @culturapoliticaycomputador9999
    @culturapoliticaycomputador9999 7 месяцев назад

    Thanks for this useful video.👍

  • @ahmadrami14
    @ahmadrami14 6 месяцев назад

    Thanks for the Tutorial

  • @omarms3341
    @omarms3341 2 месяца назад

    how to make the headerTile dynamic since its [id] at first place

  • @dickydarmawan4790
    @dickydarmawan4790 9 месяцев назад

    Thanks for the tutorial👍.

  • @atnguyenucchi9776
    @atnguyenucchi9776 7 месяцев назад

    i think this work on simple way, i have try app -> (tabs) -> (drawer). So when I in drawer I cant navigate to screen in app

  • @saqibmuhammad7218
    @saqibmuhammad7218 9 месяцев назад

    Video mean alot for me. ❤

  • @dogdev
    @dogdev 3 месяца назад

    There are about 100 Stack.Screens in the file in layout.tsx, can I keep them or how can I split them?

  • @spare4337
    @spare4337 7 месяцев назад

    The simplest one thanks

  • @lukemontana9792
    @lukemontana9792 5 месяцев назад +1

    great

  • @paysnug4470
    @paysnug4470 9 месяцев назад

    the page inside tab.screen background is not showing something overlay it

  • @amralimohamed6497
    @amralimohamed6497 9 месяцев назад

    A like even before i watch the video😊

  • @SomeRandom3DArtist
    @SomeRandom3DArtist 6 месяцев назад

    Great video👍

  • @saim4556
    @saim4556 3 месяца назад

    well you can use rnfe instead of rjsfc

  • @budiman-kr5ug
    @budiman-kr5ug 7 месяцев назад

    16:33 get overrided or nested (parent layout still exists and wrapping the child layout)?

  • @VirtualVibesMusic
    @VirtualVibesMusic 5 месяцев назад

    👍👍👍👍👍👍👍👍👍👍👍👍👍👍
    great stuff

  • @emeryd7432
    @emeryd7432 4 месяца назад

    Thanks a loooooooooooooooooooooooooooooooooooooooooooooot !

  • @h.t.8812
    @h.t.8812 6 месяцев назад

    just one question, does anyone know of a list for TabBarIcons we can use? I tried using from a general react native list and it didn't work

  • @yourgflikesit
    @yourgflikesit 7 месяцев назад

    Why did you move the users folder into the (tabs) folder? Was that required?

    • @cosdensolutions
      @cosdensolutions  7 месяцев назад

      because I wanted it to be a whole tab, so everything within it is its own stack

  • @harag9
    @harag9 9 месяцев назад +1

    Great video thanks for this. What keyboard did you get?

  • @abelmurua6980
    @abelmurua6980 7 месяцев назад

    Amazing! i just started with react native 2 days ago. This is great. How do you get the preditect text (when typing) ? its like telling you whats coming next.. whats the extension?

    • @cosdensolutions
      @cosdensolutions  7 месяцев назад +1

      github copilot :D

    • @abelmurua6980
      @abelmurua6980 7 месяцев назад

      How much do you recommend it? lol github copilot vs chatgpt? @@cosdensolutions

    • @cosdensolutions
      @cosdensolutions  7 месяцев назад +1

      I use it quite a lot, so I would recommend it. They're both the same but copilot runs in your vscode which makes it way more convenient

  • @PetersExcapades
    @PetersExcapades 7 месяцев назад

    I keep getting TypeError: Cannot read property 'isReady' of undefined, js engine: hermes and have no idea why, anyone know?

  • @josepherian4597
    @josepherian4597 14 дней назад

    doesn't navigate with me

  • @BukkyOdunsi
    @BukkyOdunsi 7 месяцев назад

    too good

  • @vyankateshmiskin9618
    @vyankateshmiskin9618 9 месяцев назад

    'cannot GET /URL' error on refresh with React Router how to fix this?

  • @benjaminkissa9100
    @benjaminkissa9100 6 месяцев назад

    can do a toturial to change it to apk file for android

  • @mishen-thakshana
    @mishen-thakshana 8 месяцев назад

    How did you instantly change ' ' to `` when putting ${}

    • @cosdensolutions
      @cosdensolutions  8 месяцев назад

      I have an extension for that :D check out my vscode vid

  • @yahyeabdullahinuur5247
    @yahyeabdullahinuur5247 9 месяцев назад

    Please make video of typescript with react i'm eager to use permanently typescript instead of javascript in my react code

  • @greenshaheen6716
    @greenshaheen6716 8 месяцев назад

    how can i use it in react-native expo bare project?

  • @abelmurua6980
    @abelmurua6980 7 месяцев назад

    Can you make a video of nesting tabs? Let say Home page has 4 TABS, but if you go inside one of those TABS (e.f. "Settings"), then those TABS get replaced but always have the HOME tab in order to go back. Cant find information on this type of structure. Imagine a react native app could have 50 screens? any tips? Thank you

    • @cosdensolutions
      @cosdensolutions  7 месяцев назад

      Well, I kinda did that by having the bottom tabs inside the index route. You can nest navigators inside other navigators. Have a look at the expo docs they have a page on that

    • @abelmurua6980
      @abelmurua6980 7 месяцев назад

      Mmm I dont see any implementation on nested tabs. Yes I have checked documentation but its not hekllping much. I was able to get tabs within tabs but I get duplicate bottom "TABS" I cant get rid of main parent set of tabs so far @@cosdensolutions

    • @cosdensolutions
      @cosdensolutions  7 месяцев назад

      aha, right. I have never had to use nested tabs, but it sounds like maybe they shouldn't be nested but rather next to each other, and you navigate between them as you would normally

    • @abelmurua6980
      @abelmurua6980 7 месяцев назад

      Maybe "nested" is not the right word. What I wanted to achieve is to have different tabs (icons /text) depending on the section of your web app. Let say you have a car & house e-commerce app. If you go to the car section you may see "buy a car", "sell a car" and "find a car" (3 tabs) but if you go to the house section you may see "buy a house", "sell a house", "rent a house", "repair a house" (4 tabs) do you this is possible or I'm using the tabs the wrong way?@@cosdensolutions

  • @HMS_55
    @HMS_55 7 месяцев назад

    🙌🙌🙌

  • @yoanhg421
    @yoanhg421 7 месяцев назад

    It's not buggy. You can't just drag a file to a different folder and not restart the build. if you had copied the files or created new ones then that would not have happened.

  • @maddyIncubus
    @maddyIncubus 9 месяцев назад

    Dude a little confused about (tabs). You say it will not appear in url but it can be used as a name in stack screens ? Could please elaborate on this ? I mean where does it break and how to probably redirect to one of the tabs directly(not the default one) from say an auth page

    • @cosdensolutions
      @cosdensolutions  9 месяцев назад +2

      Think of it as a simple folder to organise routes in. It won't show up in the URL, but it's helpful to group related routes in the same folder. Think of a "loggedIn" group and a "loggedOut" group with different screens for each. You wouldn't want "loggedIn" to show up in the url, but you would appreciate having all of the logged in routes in a separate folder than the logged out ones, so it's more organised.
      What might be slightly confusing is that to navigate to a logged in route, you'd have to pass it to the href tag like so: "loggedIn/home". But in the URL it would show up as "/home". Again, it's just to organise things and you use it to point to the route, but expo router just doesn't show it in the url so your urls are clean

    • @maddyIncubus
      @maddyIncubus 9 месяцев назад +1

      @@cosdensolutions Just a follow up question
      1) When u say url u mean it as a deeplink url or in web the browser url ?
      2) From the above example does this mean loggedIn and loggedOut techinically should not have the same file names ? would work for internal routing but not using external urls right ?
      Note: Going to stop with this question :)

    • @cosdensolutions
      @cosdensolutions  9 месяцев назад +2

      Url in the sense that when checking for matches to figure out which screen to render, the part in () is ignored. So that's the answer to both of your questions. If the pages have the same name, they'll both be matched on a url "/pageName". If they're in "loggedIn/pageName" or "loggedOut/pageName".
      You should check out the docs for grouping, it explains this really well!

    • @maddyIncubus
      @maddyIncubus 9 месяцев назад +1

      @@cosdensolutions thanks a ton man! appreciate the quick response

  • @imnash21
    @imnash21 9 месяцев назад

    You forgot how to position the tab container to the top like the FB app.

  • @PriyankBolia
    @PriyankBolia 6 месяцев назад

    Never like react-native, Ionic is much better and in React if I have to go page structure, what's wrong with next.js then?

  • @mma-dost
    @mma-dost 5 месяцев назад

    Please bring a react native project