Render a Different HTML Element as the `<TransitionGroup>` Container Element

InstructorRory Smith

Share this video with your friends

Send Tweet

In React Transition Group, the <TransitionGroup> component uses a standard <div> as its container element. This can be changed to whichever HTML element you like. This can be very important for accessibility and maintaining DOM readability. We can also pass null as the component, which means no container element is used at all. This can be important for styling.