Test: Regression test for OnChange not firing on re-renders (#7)#58
Test: Regression test for OnChange not firing on re-renders (#7)#58
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
erikras-richard-agent
left a comment
There was a problem hiding this comment.
Clean regression test for #7. Smart approach — forces parent re-renders via state update without changing the field value, then asserts OnChange doesn't fire. Exactly the right pattern.
CI ✅ CodeRabbit ✅ — Approved.
Regression test for #7. Current implementation with
useRef+useLayoutEffectcorrectly prevents OnChange from firing on re-renders when value hasn't changed.