fix(react): resolve React warnings and fix Alert title margin#72
Merged
wangdicoder merged 3 commits intomasterfrom Mar 22, 2026
Merged
fix(react): resolve React warnings and fix Alert title margin#72wangdicoder merged 3 commits intomasterfrom
wangdicoder merged 3 commits intomasterfrom
Conversation
- List: wrap renderItem results in keyed Fragments to fix missing key warning - Collapse: move extra content outside header button to fix nested button warning - Waterfall: prevent infinite loop in onLayoutChange by deduplicating layout updates - InputOTP: move onChange call outside setState updater to fix setState-during-render warning - Tag: destructure visible prop to prevent it leaking to DOM - StrengthIndicator: destructure labels prop to prevent it leaking to DOM - NativeSelect: use defaultValue instead of value in disabled demo - Alert: only apply title bottom margin when children are present
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
renderItemresults in keyedReact.Fragmentto fix missing key warningextracontent is a sibling of the toggle<button>, fixing nested<button>DOM nesting violationonLayoutChangecalls to prevent infinite re-render looponChangecallback outsidesetValueCellsupdater to fix setState-during-render warningvisibleprop so it doesn't leak onto the DOM<div>labelsprop so it doesn't leak onto the DOM<div>defaultValueinstead ofvaluein disabled demo to fix read-only field warningchildrenare presentRelease
patch@tiny-design/react(fixed version group includes@tiny-design/tokensand@tiny-design/icons)Test plan
pnpm devand verify no React warnings in the console for List, Collapse, Waterfall, InputOTP, Tag, StrengthIndicator, NativeSelect, and Alert component pagespnpm testto ensure no regressions🤖 Generated with Claude Code