react-ref Questions

2

Solved

I'm trying to pass a node from a ref to a context. But because I have no re-render after the first render, the passed node is null. I thought about two variants (but I think they aren't the best): ...
Hollenbeck asked 20/8, 2019 at 11:57

2

Solved

I have this const CompA = () => { let _input; return ( <input ref={el => _input = el} type="text" /> ); } And this const CompB = () => { const _input = useRef(null); return...
Chamaeleon asked 12/6, 2019 at 0:35

1

Solved

I am having a problem while using ref via connect and redux-form together. The structure of component is such that the ChildComponent has Forms and I am using class EditEvent extends Component {...
Mirthamirthful asked 22/1, 2019 at 10:40

1

Solved

I came across an issue when defining refs i.e. inputRef = React.createRef(null) //... const someFunction () => { if (this.inputRef && this.inputRef.current) { this.inputRef.current.f...
Caecilian asked 20/11, 2018 at 10:12

1

Solved

I'm building a React application using TypeScript. I want to create button, that scrolls to a header of a child component on my main page. I've created a ref in the child component, following thi...
Schleswigholstein asked 10/11, 2018 at 17:49

0

I am having a hard time setting a ref within a context provider. Is this not possible or is there something I am missing? I am able to createRefs in other components the same way but the following ...
Disrate asked 8/11, 2018 at 19:18

2

Solved

I am trying to use the ref property using React. I get a strange error in my browser, and I am not able to figure out what the problem is. Can anyone explain to me why I get this error: Error: ...
Ias asked 3/12, 2014 at 8:49

© 2022 - 2024 — McMap. All rights reserved.