Skip to content

Show inline event type inference in the TypeScript guide - #8686

Open
mananbharti wants to merge 1 commit into
reactjs:mainfrom
mananbharti:docs/inline-event-inference
Open

mananbharti wants to merge 1 commit into
reactjs:mainfrom
mananbharti:docs/inline-event-inference

Conversation

@mananbharti

Copy link
Copy Markdown

Summary

  • Add a small inline onChange example to the DOM Events section.
  • Explain that TypeScript infers React.ChangeEvent for its event parameter.
  • Keep the existing extracted-handler example to show when an explicit event type is needed.

Testing

  • yarn tsc passed.
  • ESLint passed on src/content/learn/typescript.md.
  • yarn test:eslint-local-rules passed.
  • Heading ID checks passed.
  • Type-checked the inline example with strict settings.
  • Checked the DOM Events section in the local site preview.

Fixes #6752

@github-actions

github-actions Bot commented Oct 7, 2026

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 — 33208b45 Deployed Oct 7, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion]: Add some elaboration to the docs for TypeScript DOM events and Pure Functions

1 participant