Skip to content

chore: prevent component prop spreading#472

Open
T-kesh wants to merge 1 commit into
rinafcode:mainfrom
T-kesh:issue-371-prop-spreading-prevention
Open

chore: prevent component prop spreading#472
T-kesh wants to merge 1 commit into
rinafcode:mainfrom
T-kesh:issue-371-prop-spreading-prevention

Conversation

@T-kesh
Copy link
Copy Markdown
Contributor

@T-kesh T-kesh commented May 29, 2026

Closes #371


This PR resolves issue #371 by auditing and eliminating unconstrained prop spreading ({...props}, {...rest}) across five wrapper components. AppText, AccessibleButton, MobileFormInput, InfiniteVirtualList, and VirtualList have each been updated to explicitly destructure and forward only the props they actually need, preventing unknown or unintended prop changes from propagating to native elements and causing unnecessary re-renders. Six other spread locations were reviewed and intentionally preserved — these cover legitimate patterns such as HOC forwarding (AuthGuard, LazyScreen) and React Navigation's required props bag (MobileDrawer) where spreading is unavoidable by design. A new docs/prop-patterns.md guide has also been added to codify when explicit destructuring is required vs. when spreading is acceptable, giving the team a clear reference to prevent regression.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@T-kesh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Kindly resolve conflict and fix workflow.

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.

Implement efficient component prop spreading prevention

2 participants