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.
@github-actions
Copy link
Contributor

🚀 Vercel preview deployments triggered successfully!

Version: deploy-3252-89b6f6f-1763617948
Triggered by: Other file changes (no packages published)
Existing packages detected:

  • @gluestack-ui/core (using current version)
  • @gluestack-ui/utils (using current version)

Projects triggered for preview:- gluestack-ui: https://gluestack-cncc29g5s-geekyants-labs.vercel.app

⏱️ Deployments are building. Check your Vercel dashboard for detailed status.

💡 These are preview deployments for testing code changes only.
🔀 Fork PR: These deployments were triggered by a maintainer for testing purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants