Quantcast
Channel: User HMR - Stack Overflow
Browsing all 43 articles
Browse latest View live

Ref to html element does not have correct height

I know this has been asked many times and the answer is always that the effect does not run when refs are mutated but that is not the issue because I run the effect every second until I have an html...

View Article


Comment by HMR on Ref to html element does not have correct height

I have tried for 2 hours to create a reproducible example but was unable to do this. In my project it would not work but my project uses content selectors that creates hidden content and at some point...

View Article


Answer by HMR for Ref to html element does not have correct height

Below is a snippet that shows the problem, using an effect to set a height state value based on a ref doesn't work if you conditionally render components passing the same ref. The solution I used was...

View Article
Browsing all 43 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>