-
Notifications
You must be signed in to change notification settings - Fork 47.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added dynamic class-name feature via classNames
attribute
#26730
Conversation
Comparing: 559e83a...de18653 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show |
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. |
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. |
Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you! |
Summary
The proposed feature is to add a new syntax for dynamically adding classes to React components. This syntax would be similar to the
ngClass
directive in Angular, allowing developers to use a classNames attribute to add or remove classes based on certain conditions.View RFC
How did you test this change?
yarn build react/index,react-dom/index --type=UMD
fixtures/packaging/babel-standalone/dev.html
as follows:and output was generated as expected
Related Issues
#3138, #16705, #20050