Skip to content

Fix React composed ref stability#3917

Draft
segunadebayo wants to merge 2 commits into
mainfrom
cursor/memoize-react-composed-refs-86ec
Draft

Fix React composed ref stability#3917
segunadebayo wants to merge 2 commits into
mainfrom
cursor/memoize-react-composed-refs-86ec

Conversation

@segunadebayo

@segunadebayo segunadebayo commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

  • add a memoized useComposedRefs hook for React ref composition
  • replace inline composeRefs(...) render calls across React components and the factory asChild path
  • add regression coverage for stable callback refs in the utility, Field.Textarea, and factory asChild paths

Tests

  • bun run react test:ci src/utils/compose-refs.test.tsx src/components/field/field.test.tsx src/components/factory.test.tsx
  • bun run react typecheck
  • bun run react lint
Open in Web Open in Cursor 

Co-authored-by: Segun Adebayo <joseshegs@gmail.com>
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ark-docs Error Error Jun 10, 2026 10:57pm

Request Review

Co-authored-by: Segun Adebayo <joseshegs@gmail.com>
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.

2 participants