React Router v6.4 ( v6.4.1 ) - Fetch data with loaders

Поделиться
HTML-код
  • Опубликовано: 28 окт 2024

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

  • @llwebstylell242
    @llwebstylell242 Год назад +1

    Спасибо за видео)
    Разработчики react-router-dom - реально молодцы.

  • @BobbyW0nder
    @BobbyW0nder 2 года назад

    Excellent video, it's the perfect introduction to React Router v6.4 with Typescript! Thank you so much 🙏

    • @Weibenfalk
      @Weibenfalk  2 года назад +2

      Thanks. Appreciate it. =)

  • @callthecapital8631
    @callthecapital8631 2 года назад +5

    Amazing demo, thank you. Could you build the same app with loaders + react query and touch on when we might need to reach for a global state manager?

    • @Weibenfalk
      @Weibenfalk  2 года назад

      You’ve got context built into react. That’s the only global state manager I use ;)

  • @СемёнЗахаренко-л8з

    Thanks. I found the answer to my question in your video.

  • @kkapgm
    @kkapgm Год назад +1

    thank you for this video, react-router v6.4.1 looks mazing with new api, hooks and this data loader, but their documentation sucks, I could never get my head around reading their documents, your video makes it simple. Keep making such great, learning videos. if possible please make a video for react-router with react query

  • @GauthierEHOLOUM
    @GauthierEHOLOUM Год назад

    How to use hook with loader? I've turned supabase sdk client into hook so when tring to access client in loader through hooks can't work

  • @BenMakerProducer
    @BenMakerProducer 2 года назад +1

    Great video ! It would be great to see how to use loaders with useQuery 😄

  • @pyrocentury
    @pyrocentury Год назад

    Thank you for the video. I have maybe a dumb question regarding typescript. How were you able to find out that the 'LoaderFunctionArgs' type definition is provided by react-router-dom? I don't see any relevant documentation on their website or github.

    • @Weibenfalk
      @Weibenfalk  Год назад +2

      I checked the files for react-router in the node-modules folder =)

  • @fotojt79
    @fotojt79 Год назад

    Thank you for the video! Is there a way to use useLoaderData for 2 different fetches, for when you need data from 2 api routes pre-loaded?

    • @Weibenfalk
      @Weibenfalk  Год назад

      Haven’t tried but guess you can just fetch them and await both of them as usual

  • @RachitGuptacool
    @RachitGuptacool Год назад

    Please suggest how to integrate redux state with loader.

  • @tomaszstec5672
    @tomaszstec5672 2 года назад

    I liked this one as all your content

  • @craigjohnson8279
    @craigjohnson8279 2 года назад

    I think this is similar to TanStack React Location? Great video Thomas!

  • @fahimulhoque9324
    @fahimulhoque9324 2 года назад

    Thanks a lot. Your contents are informative and awesome always.

  • @AMoktar
    @AMoktar 2 года назад

    Thanks, what about protected routes ?

  • @samakshgrover7437
    @samakshgrover7437 Год назад

    Very well explained 👍

  • @racine1866
    @racine1866 Год назад

    There is a way to show a loading component while the fetch is going?
    because if the fetch is slow the user will not know what is happening

    • @Weibenfalk
      @Weibenfalk  Год назад +1

      This is usually the thing with Server side fetching as it's fetching before the page is rendered. If you look at good old Wordpress sites there's no loading spinner. =)
      The data is being fetched before the HTML is rendered to the DOM. That shouldn't take too long if there's not a lot of data or a slow API.
      Loading indicators is usually used on Client side fetches.

    • @racine1866
      @racine1866 Год назад

      @@Weibenfalk thank you for the response.

  • @Malcolm777-i
    @Malcolm777-i 2 года назад +1

    Nice content ☺

    • @Weibenfalk
      @Weibenfalk  2 года назад +1

      Thanks, appreciate the support.

  • @Sylar7773
    @Sylar7773 2 года назад

    Thank You very much!!! Greate job!!!

  • @omnimathic
    @omnimathic 2 года назад

    Hello there, again me. How how can we use useLoaderData hook in nextjs, because I am comfused that nextsj manages routes with in build library without react-router-dom?

    • @Weibenfalk
      @Weibenfalk  2 года назад +1

      Yeah this is not for nextjs

  • @adityakamble7004
    @adityakamble7004 2 года назад

    Awesome as always!!!😍

  • @MightyKingKala
    @MightyKingKala 2 года назад

    what's your vs code theme? looks amazing!

  • @TheTeup
    @TheTeup 2 года назад

    Tack för en bra video 😊

  • @omnimathic
    @omnimathic 2 года назад

    Hello there, I am learnig react now, I have question that Can I pass the pokemon name and image link from Root component to its children when exact pokemon link clicked on Root component, instead of refetching every pokemon on Pokemon component?
    Thank you in advance!

    • @Weibenfalk
      @Weibenfalk  2 года назад

      I'm not refetching every pokemon in the Pokemon component. Only the data for that specific Pokemon are fetched. If you want to pass the pokemon name and image link to that specific component from the Root you can do that by URL params and grab them in the Pokemon component as I do now with the name.

    • @omnimathic
      @omnimathic 2 года назад

      @@Weibenfalk Yes, you are absolutely right. I did not relaise you are fetching names first then fetching pakemon data with that names. Thank you. Sorry for misunderstanding.

  • @MyALPHAguy
    @MyALPHAguy 2 года назад

    Hey could you make a full tutorial on React Router v6.4.1? Like building something with it using popular methods?

    • @Weibenfalk
      @Weibenfalk  2 года назад

      I think this one covers a lot of ground on how to structure and build the routes ...

  • @koronci
    @koronci Год назад

    useQuery and a loading indicator would be useful

  • @flowerofash4439
    @flowerofash4439 Год назад

    after this video now i've seen two people explaining react rotuer loader nicely without telling them what to do with the loading delay when the app do the request. not everything is a localhost

  • @johnkucharsky6927
    @johnkucharsky6927 2 года назад

    Hello, can you give me advice where to look for a job as a web developer. Where did you find your job?

    • @Weibenfalk
      @Weibenfalk  2 года назад +2

      Hard to guide you there. I’m a freelancer and contact companies that I feel interesting to work with. It can be tough from time to time but don’t give up!

    • @johnkucharsky6927
      @johnkucharsky6927 2 года назад

      @@Weibenfalk what part of your earnings comes from youtube? I've just started, i make 600 dollars a month. I'm looking for a ways to impove my skills and make more

    • @Weibenfalk
      @Weibenfalk  2 года назад

      Everything is possible. But I'm far from it..I can't really understand how you can make 600 dollars a month on your YT channel. Seems impossible if you just started.

    • @johnkucharsky6927
      @johnkucharsky6927 2 года назад

      @@WeibenfalkI started working as a web developer, I have a job. I don't have a RUclips channel. Now I want to find another job because I need more money. By the way, great video, I liked it. Also, I watch a lot of RUclips channels about programming and I see that consistency is important here. I do not know if it is worth trying to shoot a video on RUclips. I have no experience, but in any case, most of the audience does not understand programming, so I can shoot maybe short videos, about an hour long, about main concepts, react

  • @toxirbekabdullaev2082
    @toxirbekabdullaev2082 Год назад

    can you also add time code in video, please)