@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}
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
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
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?
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 ?
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
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.
Nice video, very thorough. Would love to see unit tests, integration tests and end to ends as part of another video.
@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}
Did not think of this, but you are right. I like this suggestion.
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) => [
,
,
,
,
]
You're one of the most brilliant react dev i've seen, would love to work with you at some point 🙏
Nice walkthrough! keep up the great videos.
It's really good to see best practices for react native app's. Bring more this kind of videos 🔥🙌
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
Great video, one question/argument? -> zustand vs context-api vs redux in a production app? which one would you choose & the reason?
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
Wow, very advanced and interesting approach. Well done 👍
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?
there is not need for a ref, just assign the id to a regular variable and clear it in the useffect cleanup
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 ?
Nice video! Where can we find the livestream where you build this?
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
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 ?
I like your teaching style make a nextjs course ❤
please what version of expo-router are you using here
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.
Does your React Course cover how to use Jotai as a state manager?
Love from Egypt 🇪🇬
what about performance when using tailwind in expo project , and do you recommend it for production apps
Where is the link of that live stream darius? can i get the link man?
Where can we find your stream?
Always quality content, love from Pakistan
Which vs code theme he is using? Anyone?
Is the app code shared on Github? would really like to have a look there if possible.
me too
This code equals a composition. Great work!
Hey,
Please make a video on "Profiler"( part of react dev tool)
can you share us some react native code like this video .
Hi, Cosden ❤
Senior level. Sure
Can you make a youtube course for beginners about Data structures and Algorithm please
best react dev so far
Senior level code among interns 😂
It's part of the learning. There's really nothing much between senior and junior. Senior just knows more
I miss the purple light in the background.😅
Love from BHARAT 🇮🇳
Just say india
@@Simple_OG Both are same bro
@@harshal_madgulkar No one understands Bharat at an international level
@@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
Where it is
weird