79781617

Date: 2025-10-03 09:34:24
Score: 1
Natty:
Report link

You’ve got a version-mismatch problem, not a “how to use the Button” problem. SPFx 1.21.1 is pinned to React 17.0.1 and TypeScript 5.3 (and Node 22). That combo is fine, but if your project pulls in React 18 types (or otherwise mixes React type definitions), JSX props can collapse to never, which produces errors like:

“Type string is not assignable to type never”

“This JSX tag’s children prop expects type never …”

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: microsoftdeveloperdesigner