Skip to content
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

Merged
merged 9 commits into from Jun 28, 2019

Conversation

dimensi
Copy link
Contributor

@dimensi dimensi commented Mar 12, 2019

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.

@dimensi
Copy link
Contributor Author

dimensi commented Mar 22, 2019

@jquense, @silvenon ?

@jquense
Copy link
Collaborator

jquense commented Mar 22, 2019

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!

@dimensi
Copy link
Contributor Author

dimensi commented Apr 2, 2019

Sorry, @jquense, i really want release this feature.

@jquense
Copy link
Collaborator

jquense commented Apr 2, 2019

Looks good @dimensi can you add some tests and documentation?

@dimensi
Copy link
Contributor Author

dimensi commented Apr 3, 2019

@jquense, I've added documentation and tests

@dimensi
Copy link
Contributor Author

dimensi commented Apr 18, 2019

@jquense, i update switch for context api, but now can't create sandbox with new version, because transitiongroup context now not exported.

@jquense
Copy link
Collaborator

jquense commented Apr 18, 2019

@dimensi you should be able to cherry pick it import TransitionGroupContext from 'react-transition-group/TransitionGroupContext'

@dimensi
Copy link
Contributor Author

dimensi commented Apr 18, 2019

image
codesandbox not see /esm or cjs forders

@jquense jquense changed the title SwitchTransition component feat: add SwitchTransition component Jun 28, 2019
@jquense jquense merged commit c5e379d into reactjs:master Jun 28, 2019
@jquense
Copy link
Collaborator

jquense commented Jun 28, 2019

thanks! sorry for the long delay :\

jquense pushed a commit that referenced this pull request Jun 28, 2019
# [4.2.0](v4.1.1...v4.2.0) (2019-06-28)

### Features

* add SwitchTransition component ([#470](#470)) ([c5e379d](c5e379d))
@jquense
Copy link
Collaborator

jquense commented Jun 28, 2019

🎉 This PR is included in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dimensi dimensi deleted the switch-transition branch July 7, 2019 19:52
@dimensi
Copy link
Contributor Author

dimensi commented Jul 7, 2019

I leave here working example: https://codesandbox.io/s/50p5wr3jwl

johnfrench3 pushed a commit to johnfrench3/transition-group-react that referenced this pull request Nov 2, 2022
patrickm68 added a commit to patrickm68/react-transition-group-developer that referenced this pull request Dec 1, 2022
shaikdev2 pushed a commit to shaikdev2/transition-group-react that referenced this pull request Jun 9, 2023
GreenCat1996 added a commit to GreenCat1996/react-transition-group that referenced this pull request Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants