These are chat archives for FreeCodeCamp/HelpFrontEnd
<textarea>it automatically goes to the end and it doesn't automatically update the child component where I pass the state. My code is here. https://gitlab.com/isemaj/fcc-markdown-previewer/tree/master. I saw on the other post that redux might solve the problem but I'm still not sure.
@Dalot This may help with figuring out the height of the element via JS: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements
window.getComputedStyle(myDiv).getPropertyValue("height"); // height myDiv.clientHeight; // height + padding myDiv.offsetHeight; // height + padding + border
If you're hoping to do this with CSS, it isn't possible as far as I know to calculate the height of another element. You can use percentages though to give a child element a height relative to its parent, grandparent, etc.
<div class="account"> <h1 class="account__name">...</h1> <div class="wallet"> ... </div> </div>