Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I have to pass in a custom component or custom styles that are child-aware
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/m4mb9Lg3/4/).
<div style={{width: '100%}}></div>width: 100% to the TransitionGroupWhat is the expected behavior?
I can add a transition by simply wrapping a component in TransitionGroup. Since React 16 allows you to return an array of elements, there's no need for a div. If backwards compatibility is desired, we could use special handling if component=null. Happy to PR if this has a chance of getting merged.
Which versions, and which browser / OS are affected by this issue? Did this work in previous versions?
All versions
I'm happy to see if that works, but my inclination is it might cause issue. Feel free to PR something along the lines of component={null} with some tests/stories and i'm sure i'd accept it
You could use https://github.com/gajus/react-aux to have it both React 16 and prior versions compatible.
Good call on the Aux. I recall it from Max's course on Udemy. Here is the gist:
const Aux = props => props.children
// Later that day,
<Aux>
<Yolo />
<Cat livesLeft={9} />
</Aux>
For people finding this on google, from the docs:
If you use React v16+ and would like to avoid a wrapping
<div>element
you can pass incomponent={null}on yourTransitionGroup. This is useful if the wrapping div borks your css styles.
http://reactcommunity.org/react-transition-group/transition-group
Most helpful comment
For people finding this on google, from the docs:
http://reactcommunity.org/react-transition-group/transition-group