Closed trymbill closed 3 years ago
Oh, that would have been helpful to know. I assumed this supported react router v4, implemented this and was wondering why I was getting errors. My mistake but support would be fantastic!
Sorry for any inconvenience. I'll add a note about the unavailable support for react-router v4 on the front page. I'll take a look at react-router 4 and see what I can do.
After a short investigate, I found out that callbacks are not supported on React Router 4, however the basic CSS transitions still works. You have to wrap your <Route>
with <Switch>
.
<PageTransition>
<Switch location={this.props.location}>
<Route exact path="/" component={ListPage} />
<Route path="/detail/:itemId" component={ItemDetailPage} />
</Switch>
</PageTransition>
React Router 4's philosophy of routing is quite different than it's previous version, therefore I have to see if I can still continue to support current behavior on React Router 4 or to propose a better rewrite.
It would be great if it's possible to decoupled the transitions logic from the React Router integration.
I just noticed this library has actually no dependency on React Router other than its name. Such integration only happens on the examples. Excellent.
Just set this up and started looking through the issues to figure out why it wasn't working and noticed a comment stating that React Router V4 isn't supported.
Just wondering if there are any plans to add support for V4?