-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add SwitchTransition component #470
Conversation
Hi @dimensi this looks great! sorry for the delay folks are working on stuff in their spare time and we're all a bit busy right now, so sorry for the long gap. Hoping i can give this a proper review soon. thanks a ton for doing this! |
Sorry, @jquense, i really want release this feature. |
Looks good @dimensi can you add some tests and documentation? |
@jquense, I've added documentation and tests |
94ecad5
to
43d31d4
Compare
@jquense, i update switch for context api, but now can't create sandbox with new version, because transitiongroup context now not exported. |
@dimensi you should be able to cherry pick it |
thanks! sorry for the long delay :\ |
# [4.2.0](v4.1.1...v4.2.0) (2019-06-28) ### Features * add SwitchTransition component ([#470](#470)) ([c5e379d](c5e379d))
🎉 This PR is included in version 4.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I leave here working example: https://codesandbox.io/s/50p5wr3jwl |
# [4.2.0](reactjs/react-transition-group@v4.1.1...v4.2.0) (2019-06-28) ### Features * add SwitchTransition component ([#470](reactjs/react-transition-group#470)) ([c5e379d](reactjs/react-transition-group@c5e379d))
# [4.2.0](reactjs/react-transition-group@v4.1.1...v4.2.0) (2019-06-28) ### Features * add SwitchTransition component ([#470](reactjs/react-transition-group#470)) ([c5e379d](reactjs/react-transition-group@c5e379d))
# [4.2.0](reactjs/react-transition-group@v4.1.1...v4.2.0) (2019-06-28) ### Features * add SwitchTransition component ([#470](reactjs/react-transition-group#470)) ([c5e379d](reactjs/react-transition-group@c5e379d))
# [4.2.0](reactjs/react-transition-group@v4.1.1...v4.2.0) (2019-06-28) ### Features * add SwitchTransition component ([#470](reactjs/react-transition-group#470)) ([c5e379d](reactjs/react-transition-group@c5e379d))
https://github.com/marnusw/react-css-transition-replace It is possible though that reactjs/react-transition-group#470 does what we want.
Hi @jquense and @silvenon, I came from vue and when I didn’t find the transition modes for the transition component, I started biting my elbows and worked with animations using
position: absolute
. I put together a fist and wrote a component that adds transition modes.I saw this and that the @jquense wants to add it. But the idea of the @jquense is that you need to pump through exactly the same component, I was not understood.
Here is a live example of this component https://codesandbox.io/s/50p5wr3jwl.
My idea is that I essentially repeat the behavior of the vue transition. If you change the key, the animation will play, if you change the components, but do not touch the keys, the component will be updated, but the animation will not play.
I have not added tests or jsdoc yet, because I want to get feedback first.