@@itscodingdoctor you explained also good because we need to focus using React.
@itscodingdoctor2 жыл бұрын
Thanks bro for sharing 😊
@silentwalker201119875 ай бұрын
Try to test on iOS mobile. And this will not work :)
@hassamulhaq77622 жыл бұрын
How to pass useRef to custom components.
@itscodingdoctor2 жыл бұрын
Can you tell me what is the use case?
@hassamulhaq77622 жыл бұрын
@@itscodingdoctor I've a custom component and MyInput having a simple HTML input, i add this component in App.js and want to use useRef on MyInput.
@rotembs2 жыл бұрын
@@hassamulhaq7762 Create a new ref on the Parent component: const ref = useRef() and pass it to the child with props like that: ref={ref}
@joeadeleke2 жыл бұрын
@@hassamulhaq7762 ref forwarding
@joeadeleke2 жыл бұрын
@@rotembs not so easy like that
@alexon20102 жыл бұрын
The impression I have is that nobody knows or understands how this Fucus React shit works, please it's nothing with this video, it's just that it's very stressful... Nobody uses focus this way they teach, there's still a lot of typeScript... For example I have an Input componet, where I have no idea which is the correct attribute in relation to the type script see -> it's like this in component input -> ref?: any, (BUT IT DOESN'T WORK) when having to consume component input like this -> fnOnChange('email', e.target.value)} /> Does not work