mhaagens / animated_routes_react Goto Github PK
View Code? Open in Web Editor NEWAnimated route transitions with React Router 4, ReactTransitionGroup and Animated.
Animated route transitions with React Router 4, ReactTransitionGroup and Animated.
export default connect(mapStateToProps)(AnimatedSwitch);
it doesn't work。
componentWillAppear don't execute
On line 24 in project_item.js
you should use ===
instead of a single =
. =
results in over writing the id.
...
let project = projects.filter(p => {
return (p.id === this.props.match.params.id);
});
...
Hi mhaagens,
I would like use your solution for the transition of my roads on a React application :) I've try to add your config on my App (this same version), but the transition work only when App start (so, first rendering).
After, when i change my route, AnimatedSwitch component does not seem to work : no information in console.log(). I've just componentWillAppear.
This my App.js :
export default class extends React.Component {
render() {
if (!user.isLogged) {
return <Login />;
} else {
return (
<div>
<Header />
<Route
render={({ location }) => (
<TransitionGroup component="main">
<AnimatedSwitch
key={location.key}
location={location}
>
<Route exact path={routePath.mediaCreator} component={MediaCreator} />
<Route exact path={routePath.builderAdd} component={Builder} />
<Route exact path={routePath.builderEdit} component={Builder} />
<Route exact path={routePath.myPresentations} component={MyPresentations} />
<Route exact path={routePath.presentation} component={Presentation} />
</AnimatedSwitch>
</TransitionGroup>
)}
/>
</div>
);
}
}
}
const App = (
<Router>
<Main />
</Router>
);
I think the problem is because location.key is undefined, but i don't know why.
Do you have any idea ?
Thank you !
How do I add projects to projects page? Otherwise i got this working
Hi,
Thanks for this, but when I merged it with my React 16 project, the transitions did not iterate and my screens were all opacity 0.
So I used npm-check-updates to update your package versions which broke the build.
Would be great if you could fix, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.