Skip to content

chore: prevent component prop spreading - #472

Merged
RUKAYAT-CODER merged 3 commits into
rinafcode:mainfrom
T-kesh:issue-371-prop-spreading-prevention
Jun 1, 2026
Merged

RUKAYAT-CODER merged 3 commits into
rinafcode:mainfrom
T-kesh:issue-371-prop-spreading-prevention

Conversation

@T-kesh

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

Copy link
Copy Markdown
Contributor

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

drips-wave Bot commented May 29, 2026

Copy link
Copy Markdown

@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.

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

There is still conflict.
After resolving the conflict, kindly drop a message so that i can know that the conflict is resolved.

@T-kesh

T-kesh commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

There is still conflict. After resolving the conflict, kindly drop a message so that i can know that the conflict is resolved.

conflict has been resolved. I sincerely apologise for the late fix

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit a1f0919 into rinafcode:main Jun 1, 2026
3 of 13 checks passed
@T-kesh

T-kesh commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for contributing to the project.

Thank you for the opportunity

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