I have 3 nav items that have different markup but all need the same functionality -- to animate the svg paths within it in sequence. Sounds like a good scenario to use an HOC. However, I am unable to push the refs to an array via a function (activePa...
I'm learning from the docs but don't get the line below  inputRef={el => this.inputElement = el}   Why is there a = el at the end? Isn't inputRef just supposed to be a function to grab a reference to the input?...
I want to use ref, however I am not able to use this in the conditional rendering which is initially false.  constructor(props) {     super(props);     this.state = {        filterActive: false,     }     this.firstRef = React.createRef();  }   If I...
I have a requirement to show thumbnails of videos(cards) in several rows and focus on the very first thumbnail. I did the display using Nested Map. The code basically iterates over a videos array and returns videos in several rows.  How do we focus o...
I'm developing a React Native app with Hooks. (No Classes). When we use classes, we can create a ref to a child component like this.  <Child ref={component => this.childComponent = component} />   But, how to do this when we use Hooks?...
I am still having trouble understanding ref's in React Native (and React in general). I am using functional component. I have a FlatList that has many items. How do I create a reference for a thing within an item like a Text or View component?  &...
I wanted to change some of the style of my  component when some of my textInput in focus,   I use expo 34.0.0  there are 2 methods, i have tried: using ref and using state, both have problems which i need to understand.  by far, The style in <Text...
I'm assuming the virtual DOM, and that React takes care of it with diff'ing.  But I had a recruiter say that ref's affect the actual DOM, I can't see how this can be.  I assume that they were just mistaken....
For some reason when trying to grab the ref for the child component I am getting undefined even when only asking for it later then lifecycle events of mounted and created. Here is the child component:    <template>   <div>     <div cla...
I am currently working with react but I am now stuck with an error that I don't know how to fix. I am using mCustomScroll bar and this library automatically generates an element with the id of MCSB_1. This means that I can't attach a "ref...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.