Great tips, thank you Pedro. Coming from decades of backend development, comparison I would use to resonate with old devs (like me) is: custom hooks (especially residing in same folder/subfolder) are basically functional way of achieving what "services" achieve in OOP coding (symfony, angular, nestjs,...). Both were created for similar reasons like separation of concerns and testability.
Nice short video with great tips. I would love for you to do a short video of an example project and test showing how you separate out your custom hooks from components and also how you write a test for these, as a an example
Hey Pedro, my current tech stack is HTML, css, JavaScript, reactjs, redux , bootstrap, MUI. My question is what should I learn next and from where?. I wanted to be Full stack mern developer and wanted to learn node.js and express.js and mongoDB , can you suggest from where should I learn because I am pretty confused about it.
If you wan I can give you an quick answer, All my useEffect hooks are always in a separate file (MyComponent/hooks.ts), I always respect the S solid principle (single responsibility principle) it means if my hooks make thing differents I always split it into separate hooks. When my hook is complicated I add an comment explaining the purpose of the hook All my global hooks (for example useOnClickOutside) are a hook's directory at the project's top level src - hooks - utils - components - MyComponent - page - MyPage
I'd like to see a tutorial on implementing express-sessions with redux-toolkit and rtk-query. I haven't been able to find a single one. Thanks for your videos!
Hey Pedro, I wonder if you could shoot a video about deploying a ReactJs + NodeJS + Express + MySQL on Railway, that would be much appreciated! Unfortunately Heroku did away with the free tier and now I am struggling to find out how to deploy a fullstack project and I learned that Railway would be a good solution for that. Obrigado and happy holidays!
thx bro but I think it better u show us some example code not just talking bro because I'm a beginner and many people are beginners so thanks anyway and keep it up bro
Brother firstly you are doing such a great job...❤️❤️❤️ Your tutorials are much easy and understandable,,, really appreciated Secondly I Wana ask that I have learnt J's at intermediate level and almost cover Es6 modern things, I Wana ask should I need to first become expert in J's and cover all stuff and then shift to react or i should shift to react now ,, Please guide
Great content as always. However it would've been better if you show the examples with code. About useCallback I use to put that everywhere in my project but not anymore. Recently I created a component with its hook inside another component with its own hook which receive data from the callback function from the inner component. If I don't use useCallback in the inner component, I get an infinite loop of re-rendering. React itself told me to use it in the console. 👌
Hey, can u make a new utorial with React,Node,mysql and cookies ? Ur last tutorial was good, but it was confusing.. U created back then cookies but u used sessions to get the user data, and they expire every 2 minutes..
I look at custom hooks same as components if for example i think functiinaly will be used manny times i will make custom hook same wih reusable component and if something is uniqe and i will not use it anywhere else i will leave funcrionaly inside that specific component.
To make it clear is this; when a component render it functions get recreated and when that function is passed as a props to a child component, that child component will rerender because that functions that get recreated due to the parent render, the function has actually changed and it will cause the child component receiving it as props to rerender. To prevent this rerender behavior we wrap the function in useCallBack hook to prevent this behavior
Great tips, thank you Pedro. Coming from decades of backend development, comparison I would use to resonate with old devs (like me) is: custom hooks (especially residing in same folder/subfolder) are basically functional way of achieving what "services" achieve in OOP coding (symfony, angular, nestjs,...). Both were created for similar reasons like separation of concerns and testability.
Authentication with Express/Node would be a great tutorial, love your videos as always
Would be great
The best teacher ever ❤
Nice short video with great tips. I would love for you to do a short video of an example project and test showing how you separate out your custom hooks from components and also how you write a test for these, as a an example
Hey Pedro, my current tech stack is HTML, css, JavaScript, reactjs, redux , bootstrap, MUI. My question is what should I learn next and from where?. I wanted to be Full stack mern developer and wanted to learn node.js and express.js and mongoDB , can you suggest from where should I learn because I am pretty confused about it.
When the nextjs 13 course for beginners launch ?
i want to learn it from experienced dev like you
Thanks
I just subscribed you for react and love your videos sir,
Thanks for everything
That awesome, I'm always questions if it's good to make a custom hook for every logic in my application.
Thanks pro ❤️❤️🔥
Definetly agree, quick question : where do you put your custom hooks to keep project folder structure clean and organized ?
If you wan I can give you an quick answer,
All my useEffect hooks are always in a separate file (MyComponent/hooks.ts), I always respect the S solid principle (single responsibility principle) it means if my hooks make thing differents I always split it into separate hooks. When my hook is complicated I add an comment explaining the purpose of the hook
All my global hooks (for example useOnClickOutside) are a hook's directory at the project's top level
src
- hooks
- utils
- components
- MyComponent
- page
- MyPage
Hi Pedro, can you recommend a channel for Angular please?
PS, hooks can be called in functional components, or inside other custom hooks
It would be better if given a coding example
I agree! I should've put an infographic for the useCallback example, sorry about that hahaha I will do it next time :)
I hope he will do next year hooks best practices in 2024 🙃
Hey Pedro,
Do you have any repo where you implement this custom hooks logic?
I'd like to see a tutorial on implementing express-sessions with redux-toolkit and rtk-query. I haven't been able to find a single one. Thanks for your videos!
Which camera u r using brother
Mano seu canal eh top, mas conta ai como aprendeu o ingles e chegou no dominio? Parabens
Thank you
Thank you 😍😍😍
Hey Pedro, I wonder if you could shoot a video about deploying a ReactJs + NodeJS + Express + MySQL on Railway, that would be much appreciated! Unfortunately Heroku did away with the free tier and now I am struggling to find out how to deploy a fullstack project and I learned that Railway would be a good solution for that. Obrigado and happy holidays!
thx bro but I think it better u show us some example code not just talking bro because I'm a beginner and many people are beginners so thanks anyway and keep it up bro
Brother firstly you are doing such a great job...❤️❤️❤️ Your tutorials are much easy and understandable,,, really appreciated
Secondly I Wana ask that I have learnt J's at intermediate level and almost cover Es6 modern things,
I Wana ask should I need to first become expert in J's and cover all stuff and then shift to react or i should shift to react now ,, Please guide
One question: could you make video on difference between isomorphic-fetch and normal fetch in react?
Great content as always. However it would've been better if you show the examples with code.
About useCallback I use to put that everywhere in my project but not anymore. Recently I created a component with its hook inside another component with its own hook which receive data from the callback function from the inner component. If I don't use useCallback in the inner component, I get an infinite loop of re-rendering. React itself told me to use it in the console. 👌
Can you please make a video on redux .
Black Nail polish or riot 😤
It comes in cycles hahaha maybe next month I will do it again!
Great bro
You are great. Where is going to be another project ? :))
Pedro, tu é foda!
Hey i tried the Instagram link , it dsnt seem to work, please check that!
Hey, can u make a new utorial with React,Node,mysql and cookies ? Ur last tutorial was good, but it was confusing.. U created back then cookies but u used sessions to get the user data, and they expire every 2 minutes..
I look at custom hooks same as components if for example i think functiinaly will be used manny times i will make custom hook same wih reusable component and if something is uniqe and i will not use it anywhere else i will leave funcrionaly inside that specific component.
Why there is no code example 🤔
Great thanks
Always the best
Would never not pay attention in class if my teacher was this sexy looking, ngl🙋😂❤️
Lmaoo thank you
useCallback() not needed for passing as a component’s props, really? Can you show an example?
It is use to prevent a child component to rerender when it props have not changed even if the parents component rerender
@@ericmomoh7927 example when no needed as a props?
To make it clear is this; when a component render it functions get recreated and when that function is passed as a props to a child component, that child component will rerender because that functions that get recreated due to the parent render, the function has actually changed and it will cause the child component receiving it as props to rerender. To prevent this rerender behavior we wrap the function in useCallBack hook to prevent this behavior
GoodJob! If you talk about some case is better if you show example at code.
Lesson chatgpt
About
ChatGPT video is coming soon!
It is hard to imagine what you are saying when there is no illustration, pure talking.