Skip to content

Document ref as a createElement prop in React 19 - #8762

Open
smg99 wants to merge 3 commits into
reactjs:mainfrom
smg99:docs/create-element-ref-prop
Open

smg99 wants to merge 3 commits into
reactjs:mainfrom
smg99:docs/create-element-ref-prop

Conversation

@smg99

@smg99 smg99 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Update the createElement parameters, return value, and caveats for React 19. A supplied ref is available as element.props.ref. React exposes key separately, and reading element.ref is deprecated.

Verified on React 19.0.0 that a supplied ref remains in the props, a numeric key is converted to a string, and the legacy element.ref accessor issues a deprecation warning. git diff --check passed.

@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

This branch was successfully deployed

1 active deployment
Preview — ada5f8e7 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant