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

[Feature]: Transition Modes for First-Class Sequential Enter/Leave (instead of Parallel) #339

Open
tsiq-swyx opened this issue May 18, 2018 · 6 comments

Comments

@tsiq-swyx
Copy link

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Currently, entering and leaving elements run in parallel. You can choose to use CSS to overlay the entering element on top of the leaving element, and you can manually keyframe transitions such that one starts after the other, but this is gnarly as heck (and quite frankly I couldn't find a blogpost on it). In Vue Transition Modes you can just specify mode="out-in" and you're done. I think this is a common enough pattern (and best handled by the library instead of in userland/in css).

What is the expected behavior?

See Vue Transition modes https://vuejs.org/v2/guide/transitions.html#Transition-Modes
and see also Sarah Drasner's page transitions app in Vue vs its React clone

Potentially related issue: #73

@jquense
Copy link
Collaborator

jquense commented May 18, 2018

i do want to add this, and I think it's totally feasible someone just has to do it. I think i have a started POC adding them to the ReplaceTransition which is a little more akin to the VUE transition. I'll see if i can dig it up

@tsiq-swyx
Copy link
Author

cool. idk if i can commit to doing a PR as im pretty full up, its just a thing that ive wished for that came up when Sophie Alpert asked for easy wins

@jquense
Copy link
Collaborator

jquense commented May 18, 2018

here's the branch if anyone is interested https://github.com/reactjs/react-transition-group/tree/modes-spike

@tsiq-swyx
Copy link
Author

lol Kyle Mathews just pointed me to https://github.com/cheapsteak/react-transition-group-plus and it has exactly what we need.. only problem is they forked off 2 years ago...

@igormigas
Copy link

So... any chance to get the "out-in" feature running in this package?

@IGassmann
Copy link

@tsiq-swyx What's the best way so far you've figured to achieve this?

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

No branches or pull requests

4 participants