How to use TransitionComponent in React-Bootstrap

You can get the typescript definition by including

import {TransitionComponent} from "react-bootstrap";

To use a transition, it looks like you import a TransitionComponent either from react-bootstrap, which includes Collapse and Fade, or from the underlying package react-transition-group. You pass the whole component to ToastContainer. If a transition prop is not included, it defaults to Fade.

import {Collapse, Toast as ToastContainer} from "react-bootstrap";

<ToastContainer onClose={onClose} show={!!message} delay={7000} animation transition={Collapse}>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top