Open obaricisse opened 4 days ago
Our of curiosity, why are you externally triggering state update instead of triggering by a button press? That would be a recommended way in RNTL as it would resemble a real user interaction.
you need the button to be enabled in order to press it. the state update is to enable or disable the button. and it is triggered by a componentDidUpdate. Also this is just an example of how to repro the error. The use case makes more sense in my specific case.
could you put it in a repro repo so I could reproduce it too?
let me know if you have any access issue.
Describe the bug
How do I get rid of this warning an update to ForwardRef inside a test was not wrapped in act? I am already using act in my test but keep getting this warning even though test passes. see repro step.
Expected behavior
Steps to Reproduce
Here is an example component and the output.
Screenshots
Versions
12.7.2