I'm working on my React website and I'm using React-router-dom for switching routes and React-transition-group to animate these routes. Everything is working just fine except I'm getting an error in my console when I switch routes.
Error :
I'm not that skilled in React yet and had this problem before and didn't fixed it. I've tried to google it but all I've found was to disable StrickMode and I think that's not the right solution.
App.js file
<Router>
<div className="App">
<div className="wrapper">
<Navigation />
<Route key="/" exact path="/">
{({match})=>(
<CSSTransition
in={match != null}
timeout={300}
classNames="slide-backward"
unmountOnExit
>
<div className="page">
<Home />
</div>
</CSSTransition>
)}
</Route>
<Route key="/about" exact path="/about">
{({match})=>(
<CSSTransition
in={match != null}
timeout={300}
classNames="slide-forward"
unmountOnExit
>
<div className="page">
<About />
</div>
</CSSTransition>
)}
</Route>
</div>
</div>
</Router>
Navigation component
<div className="menu">
<ul>
<li><NavLink to="/" exact activeClassName="active">Domov</NavLink></li>
<li><NavLink to="/about" exact activeClassName="active">O nás</NavLink></li>
</ul>
</div>
Many thanks in advance.