Custom Hooks in React (Design Patterns)

Custom Hooks in React (Design Patterns)

Cosden Solutions

3 месяца назад

29,746 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@gutierrezpaulchristianl.6466
@gutierrezpaulchristianl.6466 - 14.02.2024 16:10

i know this is not react related but, can u do a tutorial on neovim or vim or just the vim motion in your vscode

Ответить
@mohamedsalimbensalem6118
@mohamedsalimbensalem6118 - 14.02.2024 16:39

can you please make a video about casl in react ? or virtualization in react (from scratch)

Ответить
@mDHARYL
@mDHARYL - 14.02.2024 16:45

Nice. Must watch this later . 😊

Ответить
@Khnx04
@Khnx04 - 14.02.2024 16:46

@cosdensolutions please share the Code

Ответить
@Khnx04
@Khnx04 - 14.02.2024 16:47

@cosdensolutions please share the code

Ответить
@anonysmooth648
@anonysmooth648 - 14.02.2024 17:32

hi question when to use this clean up pattern?

useEffect( ()=>{

var mounted = true
// do logic here

return () => { mounted = false }

},[])

Ответить
@ddorabang
@ddorabang - 14.02.2024 17:36

1440p. great!

Ответить
@ShivaprasadBilgundi
@ShivaprasadBilgundi - 14.02.2024 17:45

a video on your vs code setup

Ответить
@nigeldasilvalima4568
@nigeldasilvalima4568 - 14.02.2024 17:56

Just a reminder: custom hooks do not need to have .tsx or .jsx file extensions, when they dont return any JSX code.
The only thing is that they need to be called within a functional component

Ответить
@akilavan2149
@akilavan2149 - 14.02.2024 19:39

Hi I have watched your single responsibility principle, in that video you have mentioned a separate util to fetch the api, should the api fetching part in the useFetchComments should moved separately to achieve SRP ?

Ответить
@faizanshaikh2351
@faizanshaikh2351 - 14.02.2024 22:10

Sir use the simple react without Typescript more people will watch, understand and grasp the code properly.

Ответить
@samratchandravanshi3869
@samratchandravanshi3869 - 14.02.2024 22:19

Really quality content

Ответить
@yoky0429
@yoky0429 - 15.02.2024 06:26

thanks you!!! (especially subtitle)

Ответить
@a7lavinraj863
@a7lavinraj863 - 15.02.2024 07:18

this is exactly what i need

Ответить
@adilmustafa1748
@adilmustafa1748 - 15.02.2024 07:38

In Initial code, it was locally adding the comment, in Your refactor code you are fetching all records again. And its a good practice to do update the state locally without fetching on each comment. So how can we locally update the state using mentioned custom hooks approach,
Thank you

Ответить
@joelbrighton2819
@joelbrighton2819 - 15.02.2024 08:46

I had a discussion just yesterday about what should be contained within a custom hook. Should it only be code which includes state management / jsx or can it also include 'helper' functions (which could just be part of a non-hook helper file)? I'd be interested in hearing peoples perspectives.

Ответить
@kaluczadzsi
@kaluczadzsi - 15.02.2024 15:14

Love your videos, will you create a react course with TS? I would definetly buy it!

Ответить
@hazemgharib
@hazemgharib - 15.02.2024 17:30

I love that you make it look so easy even for people who are not very much experienced with react.

Ответить
@ericlorback4084
@ericlorback4084 - 16.02.2024 04:27

These types of videos are the types of videos that I benefit from the most. Very clean and very straightforward. Thank you

Ответить
@macismail2003
@macismail2003 - 16.02.2024 12:41

Great and simple tutorial to understand Custom Hooks, thank you. Just a question though - how does it improve performance comparing to the initial code as you explained?

Ответить
@sontranvan5348
@sontranvan5348 - 16.02.2024 13:28

it helps me a lot, really appreciate all of your videos, thank you

Ответить
@UFO_808
@UFO_808 - 16.02.2024 14:04

Bro how long have you been coding for?

Ответить
@socaramdhani8046
@socaramdhani8046 - 17.02.2024 05:14

very nice clear precise and effective video, every time ads come i will never skip the ads i'll try to help people like you as best as i can😁

Ответить
@DellmantHD
@DellmantHD - 17.02.2024 13:03

Can you make a video guide for Vim in vs code. how to do add it and set it up. Would be very usefull. Thanks!

Ответить
@bharadwaz2
@bharadwaz2 - 18.02.2024 18:03

I humbly suggest considering a tutorial series that encompasses all the essential topics.

Ответить
@brNoMundo123
@brNoMundo123 - 20.02.2024 03:02

Seus vídeos são incríveis e explicativos 👏👏👏👏

Ответить
@mahadihassan5596
@mahadihassan5596 - 21.02.2024 11:23

Do we have any code repo for this video?

Ответить
@siddhartha-555
@siddhartha-555 - 26.02.2024 19:16

I prefer writing my custom hook code in my component file as it is better organized and easily maintainable. Is there any downside to this approach in the long run?

Ответить
@mladenorsolic370
@mladenorsolic370 - 28.02.2024 19:58

When you say custom hooks have to be prefixed with use, just for clarity, its just a best practice, react doesnt impose this nor it would treat a hook function any different if it wasnt prefixed with use.

Ответить
@aarondean1872
@aarondean1872 - 03.03.2024 01:32

Firstly, this is incredible content! Very clear instructions. Quick question: what if you've abstracted state that needs to be updated via some sort of interaction (e.g. like a button click)? do you also pass down "setters" for the state ,or is that an anti-pattern?

Ответить
@nanonkay5669
@nanonkay5669 - 10.03.2024 11:49

React devs, this guy is the real deal. Trust

Ответить
@dudutravi
@dudutravi - 18.03.2024 00:29

what theme are you using in vscode?

Ответить
@SaurabhMisra-yf8lf
@SaurabhMisra-yf8lf - 21.03.2024 18:11

Awesome tutorial! Clear, concise and exhaustive. 💯

Ответить
@GigaFro
@GigaFro - 26.03.2024 10:15

Loved the video! Would it also have been reasonable to keep the comments/setComments in CommentsPage and pass comments/setComments to both useFetchComments and useAddComment?

Ответить
@arturmrozinski7536
@arturmrozinski7536 - 27.03.2024 20:16

Awesome, now I need to do it again in slow motion with a lot of extra processing :)

Ответить
@doorey2
@doorey2 - 27.03.2024 23:26

Perfect tutorial. Must watch for beginner react devs

Ответить
@ananthac6472
@ananthac6472 - 25.04.2024 18:07

so this is an alternative for HOC , right?

Ответить
@harvey_04
@harvey_04 - 05.05.2024 10:26

Great video

Ответить
@muhammedsahad1612
@muhammedsahad1612 - 05.05.2024 14:09

I could learn a lot of from your videos. ❤

Ответить