Skip to content

Conversation

@mrsants
Copy link

@mrsants mrsants commented Nov 8, 2025

This PR fixes an issue where the Badge component did not update its style when the action, variant, or size props were changed dynamically through React state.

The problem was caused by the internal style context not re-rendering when these props changed.

This update ensures that the Badge and its children (BadgeText, BadgeIcon) now react properly to prop and state updates — without needing the key workaround.

Previously, the Badge component did not update its visual state when
the `action`, `variant`, or `size` props were driven by React state.
This happened because `withStyleContext` memoized context values and
did not trigger a re-render for style context consumers.
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.

1 participant