The Best React Code I Wrote (Code Review)

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

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

  • @ruslanvolyar4699
    @ruslanvolyar4699 2 месяца назад +6

    Nice video, very thorough. Would love to see unit tests, integration tests and end to ends as part of another video.

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

    Nice walkthrough! keep up the great videos.

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

    You're one of the most brilliant react dev i've seen, would love to work with you at some point 🙏

  • @GerardoSabetta
    @GerardoSabetta Месяц назад +1

    If you don't like dealing with data being undefined in react query just use a suspense query instead, you could replace those providers with suspense boundaries and it would make things more readable

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

    It's really good to see best practices for react native app's. Bring more this kind of videos 🔥🙌

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

    @4:21 I think the way you can make the providers more cleaner and maintainable is to have a main app provider wrapper the stores all of the providers then just have children a prop. {children}

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

      Did not think of this, but you are right. I like this suggestion.

    • @SebastianBila-hk7xp
      @SebastianBila-hk7xp 2 месяца назад

      Coult be also something like this
      ...
      // ======
      const renderProvider = (
      children: React.ReactNode,
      component: React.ReactElement
      ) => React.cloneElement(component, {}, children)
      export type MultiProviderProps = React.PropsWithChildren
      export const RootProvider: React.FC = ({
      providers,
      children,
      }) => {
      return (
      {providers.reduceRight(renderProvider, children)}
      )
      }
      // =========
      // Order is matter!
      const buildProviders = ({
      currentLocale,
      microcopy,
      forms,
      previewDate,
      }: any) => [
      ,
      ,
      ,
      ,
      ]

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

    Nice video! Where can we find the livestream where you build this?

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

    Wow, very advanced and interesting approach. Well done 👍

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

    Great video, one question/argument? -> zustand vs context-api vs redux in a production app? which one would you choose & the reason?

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

      I am not a senior developer I might be wrong but I think redux will be more optimised approach than zustand. But for a complex production grade code base only context is a big no

  • @GuilhermeCosta-rg7tk
    @GuilhermeCosta-rg7tk Месяц назад

    I'm curious to know more about the performance of your app, re-render and stuff like that, could you do a video about react dev tools and that toogle that shows the render boxes in real time for android?
    thanks for all the videos, learning a lot

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

    It's always interesting to look at someone else's code base. First impression is that I feel like typescript isn't being used to it's full potential in a lot of the places. I would certainly define ItemRarity type over using Item["rarity"], etc.
    And that using a centralized store like redux or something similar would significantly reduce the amount of info that needs to be passed around on the routes or remove the need for routing entirely. I am personally not a fan of routing outside of allowing for bookmarks, navigation, etc.

  • @adityaprasad3122
    @adityaprasad3122 2 месяца назад +5

    I like your teaching style make a nextjs course ❤

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

    Love from Egypt 🇪🇬

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

    Should I assign setTimeout to a ref and clear it using clearTimeout in React to avoid potential memory leaks and ensure proper cleanup, or is there a more efficient approach for managing timeouts?

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

      there is not need for a ref, just assign the id to a regular variable and clear it in the useffect cleanup

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

    I’m a junior dev so I want to ask a question to make things clear, 6:03 in this component you define queries and mutations, for my understanding we shouldn’t write business logic inside the components, but make custom hook instead to make the code more reusable, I would be happy if you can explain why you did it that way.
    I also see that later on you did implemented a custom hook, so why later on and not on 6:00 ?

  • @MalickDiene-ne2yj
    @MalickDiene-ne2yj Месяц назад

    did you encounter any issues about expo router, like expo telling you that you have to create an index.js file in your app directory ?

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

    Does your React Course cover how to use Jotai as a state manager?

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

    please what version of expo-router are you using here

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

    Always quality content, love from Pakistan

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

    Where can we find your stream?

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

    Senior level. Sure

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

    Hi, Cosden ❤

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

    Where is the link of that live stream darius? can i get the link man?

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

    what about performance when using tailwind in expo project , and do you recommend it for production apps

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

    Hey,
    Please make a video on "Profiler"( part of react dev tool)

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

    Is the app code shared on Github? would really like to have a look there if possible.

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

    This code equals a composition. Great work!

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

    Which vs code theme he is using? Anyone?

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

    Can you make a youtube course for beginners about Data structures and Algorithm please

  • @HoussemBahri-nn3qt
    @HoussemBahri-nn3qt 2 месяца назад

    can you share us some react native code like this video .

  • @Александр-ф9в4ю
    @Александр-ф9в4ю 2 месяца назад +2

    Senior level code among interns 😂

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

      It's part of the learning. There's really nothing much between senior and junior. Senior just knows more

  • @harshal_madgulkar
    @harshal_madgulkar 2 месяца назад +13

    Love from BHARAT 🇮🇳

    • @Simple_OG
      @Simple_OG 2 месяца назад +3

      Just say india

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

      @@Simple_OG Both are same bro

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

      @@harshal_madgulkar No one understands Bharat at an international level

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

      @@Simple_OG I hope they can use Google and see popular and greatest Flag there. And I am proud as it's the original name

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

      Where it is

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

    best react dev so far

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

    I miss the purple light in the background.😅

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

    weird