#47 Auto Focus React Input? | React Interview Questions

  Рет қаралды 2,351

itsCodingDoctor

itsCodingDoctor

Күн бұрын

Пікірлер: 19
@pratik9822
@pratik9822 2 жыл бұрын
👍👍
@itscodingdoctor
@itscodingdoctor 2 жыл бұрын
👍
@rotembs
@rotembs 2 жыл бұрын
You can use autofocus attribute as well
@itscodingdoctor
@itscodingdoctor 2 жыл бұрын
Can you write an example here?
@rotembs
@rotembs 2 жыл бұрын
@@itscodingdoctor www.w3schools.com/tags/att_input_autofocus.asp
@hassamulhaq7762
@hassamulhaq7762 2 жыл бұрын
@@itscodingdoctor you explained also good because we need to focus using React.
@itscodingdoctor
@itscodingdoctor 2 жыл бұрын
Thanks bro for sharing 😊
@silentwalker20111987
@silentwalker20111987 5 ай бұрын
Try to test on iOS mobile. And this will not work :)
@hassamulhaq7762
@hassamulhaq7762 2 жыл бұрын
How to pass useRef to custom components.
@itscodingdoctor
@itscodingdoctor 2 жыл бұрын
Can you tell me what is the use case?
@hassamulhaq7762
@hassamulhaq7762 2 жыл бұрын
@@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.
@rotembs
@rotembs 2 жыл бұрын
@@hassamulhaq7762 Create a new ref on the Parent component: const ref = useRef() and pass it to the child with props like that: ref={ref}
@joeadeleke
@joeadeleke 2 жыл бұрын
@@hassamulhaq7762 ref forwarding
@joeadeleke
@joeadeleke 2 жыл бұрын
@@rotembs not so easy like that
@alexon2010
@alexon2010 2 жыл бұрын
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
@itscodingdoctor
@itscodingdoctor 2 жыл бұрын
Try to follow exact code
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 40 МЛН
Brightwells Plant and Machinery Friday, 6th December 2024 Auction
7:49
Brightwells Plant, Machinery & HGV
Рет қаралды 130
React OTP Input Field With Typescript & Tailwind CSS
19:30
Full Stack Niraj
Рет қаралды 27 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 490 М.
React Interview Questions | Beginner to Advanced
26:42
PedroTech
Рет қаралды 42 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 231 М.
Top 100 React JS Interview Questions and Answers
3:10:07
Interview Happy
Рет қаралды 223 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31