React tutorial in Hindi #43 forwardRef example

preview_player
Показать описание
In this react js tutorial for beginners series we learn what is a forward ref and how to use forward ref with interview questions in react js. This video is made by anil Sidhu in the Hindi Language Language.

git link for this video

Playlist for complete React series in Hindi

forwardRef in React js
Why use forwardRef.
Make Child Component.
Pass Ref with props and use it.
Interview Question.
Рекомендации по теме
Комментарии
Автор

one of the most underrated youtuber for gaining the knowledge of coding. i am following this react js series and till now i can say that Anil Siddhu Sir You are a gem and thanks for this series.

chakshuarora
Автор

from last 10 days, i was stuck and looking for guidance about forwardRef. huge thanks for support and amazing explanation. bhai waah.

lalamaxd
Автор

we can simply do it by passing inputref as props. i did it and it works

ShivShankar
Автор

Thanks a lot. Especially, while exporting you just wrapped the component name. I mean it just make the code really easy to read and clean

rusty-coder
Автор

I send refinput as props in user component through app.js and update the input without forward ref
And it work as expected so

My question is that this is Recommended way to do that ?

doedits
Автор

very helpful video as the example was simple

boxerlobsters
Автор

now i have 1 small question . rather than directly setting value in child component . Q. is it possible to call a function in child component.? that would be super helpful as well. >> i.e in my case, child component is react three fiber (gltf car model) i wanted to change color from parent component.

lalamaxd
Автор

Can you bother a little to make a vedio on how to send refs from child to parent, it will be appreciated a lot .

saurabrakshit
Автор

I don't understand why should we need forward ref,
(we can simply just pass the inputRef through props and use it inside child)
it works just fine I check it out

ehsankabir
Автор

Bhaiya jaise aapne js ka interview questions pe video banaya tha karib 2 ghante ka h, waise hi react banaiye na

ajayshah
Автор

Diffrence between useRef and CreateRef. Answer is not that useRef is use in RFC and other is in RCC. It is something else what is that?

nimeshtank
Автор

when we send ref in the child component will we must write props in the function parameter in child component?

fahadraza
Автор

when we use forwardRef in class component

class Tut43Child extends Component {
render() {
return (
<div>
<input className='mb-3' type="text" ref={this.props.myref} />
</div>
);
}
}

export default forwardRef((props, ref) => <Tut43Child {...props} myref={ref} />);

coder-ccpd
Автор

useEffect aur useMemo me difference bata den

iamazeemhayder
Автор

if we want to change something in parent from child how can we do it (In functional components)

NoumanKhan-ckvx
Автор

what if the input tag is in one component and I need to access the value of the input into another component(not parent or child component)
then can it be done using forwardref????

harshdubey
Автор

sir how can i transfer 2 ref for different input in same functional child component?

sunnybadgujar
Автор

It's request agar aapko time mile to bana dijiye 🙏

ajayshah
Автор

bro instead of asking questions make ppt of all the questions that are related to this content and answer them at the end...

nirajsathe
Автор

Couldn't get ur a/c on insta. Is it php.step.by.step??

abdulhannan