Add support for empty classNames#481
Merged
jquense merged 1 commit intoreactjs:masterfrom Apr 2, 2019
danielhusar:master
Merged
Add support for empty classNames#481jquense merged 1 commit intoreactjs:masterfrom danielhusar:master
jquense merged 1 commit intoreactjs:masterfrom
danielhusar:master
Conversation
jquense
reviewed
Apr 2, 2019
src/CSSTransition.js
Outdated
|
|
||
| getClassNames = (type) => { | ||
| const { classNames } = this.props; | ||
| const prefix = classNames ? classNames + '-' : ''; |
Collaborator
There was a problem hiding this comment.
i'd also check that it's a string to avoid concating an object to a string unnecessarily
Collaborator
|
thanks! |
jquense
pushed a commit
that referenced
this pull request
Apr 2, 2019
# [2.8.0](v2.7.1...v2.8.0) (2019-04-02) ### Features * add support for empty classNames ([#481](#481)) ([d755dc6](d755dc6))
Collaborator
|
🎉 This PR is included in version 2.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
9 tasks
alesn
pushed a commit
to alesn/DefinitelyTyped
that referenced
this pull request
Apr 23, 2019
…ransition/>` Since v2.8.0, classNames prop has been optional. See also: - https://github.com/reactjs/react-transition-group/blob/v2.8.0/CHANGELOG.md - reactjs/react-transition-group#481
This was referenced Sep 24, 2019
This was referenced Mar 26, 2020
johnfrench3
pushed a commit
to johnfrench3/transition-group-react
that referenced
this pull request
Nov 2, 2022
# [2.8.0](reactjs/react-transition-group@v2.7.1...v2.8.0) (2019-04-02) ### Features * add support for empty classNames ([#481](reactjs/react-transition-group#481)) ([d755dc6](reactjs/react-transition-group@d755dc6))
patrickm68
added a commit
to patrickm68/react-transition-group-developer
that referenced
this pull request
Dec 1, 2022
# [2.8.0](reactjs/react-transition-group@v2.7.1...v2.8.0) (2019-04-02) ### Features * add support for empty classNames ([#481](reactjs/react-transition-group#481)) ([d755dc6](reactjs/react-transition-group@d755dc6))
shaikdev2
pushed a commit
to shaikdev2/transition-group-react
that referenced
this pull request
Jun 9, 2023
# [2.8.0](reactjs/react-transition-group@v2.7.1...v2.8.0) (2019-04-02) ### Features * add support for empty classNames ([#481](reactjs/react-transition-group#481)) ([d755dc6](reactjs/react-transition-group@d755dc6))
GreenCat1996
added a commit
to GreenCat1996/react-transition-group
that referenced
this pull request
Aug 1, 2023
# [2.8.0](reactjs/react-transition-group@v2.7.1...v2.8.0) (2019-04-02) ### Features * add support for empty classNames ([#481](reactjs/react-transition-group#481)) ([d755dc6](reactjs/react-transition-group@d755dc6))
This was referenced Sep 7, 2024
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.
Hey!
I think it would be quite usefull if
classNamesprop would be optional, and it would still work without it.In our use-case we are using it together with styled components and it's quite annoying to add those prefixes all the time, when component styles are already scoped.
Also if you pass empty string, it adds classes beginning with
-.