Testing hooks set with refs properties
Thanks, for the good work and please keep it up. I am having a problem 😭 , Below, I have tried to show what my parent component looks like as a sandbox might take me a bit too long. I have also posted a snippet of what my InputTextfield component looks like and a pic for clarity. The issue i have is at the moment I am setting the paddingRight property of the textInput based on the width of the optional Element specified, this could be anything depending on what is passed in. I have used a combination of useState, useEffect and ref to get the width of the optional item. But I am not sure how I can test this behaviour with react-testing-library
https://codesandbox.io/s/zx0r4xxqol
<div>
<TextInput
id={inputextId}
value={value}
paddingRight={`${width}rem`}
/>
<Label id={inputextId}>
{label}
</Label>
<OptionalElement
innerRef={optionalElementRef}
optionalText={optionalText}
showIcon={showIcon}
/>
</div>

@kentcdodds I have put it in a codesandbox. Thanks