Skip to content

fix(react): remove children property from runtime Trans#2151

Merged
andrii-bodnar merged 1 commit into
lingui:mainfrom
timofei-iatsenko:fix-trans-typings
Jan 16, 2025
Merged

fix(react): remove children property from runtime Trans#2151
andrii-bodnar merged 1 commit into
lingui:mainfrom
timofei-iatsenko:fix-trans-typings

Conversation

@timofei-iatsenko
Copy link
Copy Markdown
Collaborator

Description

Trans from @lingui/react doesn't accept children but has it in props definition. This is a bug which lead a confusion for users.

This PR drops incorrect property from TransProps

After this change, user would be informed by typescript about incorrect usage of a Trans component.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Examples update

Fixes # (issue)

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Jan 15, 2025 10:56am

@github-actions
Copy link
Copy Markdown

size-limit report 📦

Path Size
packages/core/dist/index.mjs 2.91 KB (0%)
packages/detect-locale/dist/index.mjs 618 B (0%)
packages/react/dist/index.mjs 1.37 KB (0%)

@andrii-bodnar andrii-bodnar merged commit 7540adb into lingui:main Jan 16, 2025
@timofei-iatsenko timofei-iatsenko deleted the fix-trans-typings branch January 16, 2025 08:13
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