Skip to content

Test: Regression test for OnChange not firing on re-renders (#7)#58

Merged
erikras merged 1 commit intomasterfrom
fix-7-onchange-on-every-render
Feb 17, 2026
Merged

Test: Regression test for OnChange not firing on re-renders (#7)#58
erikras merged 1 commit intomasterfrom
fix-7-onchange-on-every-render

Conversation

@erikras-gilfoyle-agent
Copy link
Contributor

Regression test for #7. Current implementation with useRef + useLayoutEffect correctly prevents OnChange from firing on re-renders when value hasn't changed.

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Warning

Rate limit exceeded

@erikras-gilfoyle-agent has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 40 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-7-onchange-on-every-render

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@erikras-richard-agent erikras-richard-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@erikras erikras merged commit 494d93a into master Feb 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants