ReplaceTransition documentation
What would you like improved?
I came across one case recently when I needed to move out one component and move in another one at the same time. I couldn't figure out what to do until I looked into the source code and found that there is a ReplaceTransition component available, which is not mentioned in the documentation.
Is there a reason for that? I think it would be good to have it on documentation site.
When SwitchTransition was added, it wasn't put into the context of ReplaceTransition, probably precisely because ReplaceTransition wasn't documented, I assume it was an "out of sight, out of mind" situation. I don't think there was a special reason for not documenting, it's added to Storybook so that probably felt like documentation enough at the time.
However, I recommend recommend using TransitionGroup, rather than ReplaceTransition, for simultaneously switching between two (or more) transition components, this is what the documentation for SwitchTransition recommends. We might eventually add this functionality to SwitchTransition, but I currently don't see the reason to, considering that there doesn't seem to be a downside of doing this with TransitionGroup, so it's highly likely that we'll simply deprecate ReplaceTransition.
Let me know if you have any more questions. 👂