Create a TransitionGroup component that provides three hooks!
- Component Will Enter
- Component Will Leave
- Component Will Update
Component Will Update is for items that were previously in the list, that are no longer in the list.
This is somewhat available today by using the componentWillUpdate instance method on a component, but I don't want to have to provide specific props to check. I want the TransitionGroup to just tell me hey, these are the items that are staying, these are the items that are going, and these are the items that are coming.
The majority of the logic can be borrowed from the current ReactTransitionGroup, the part that will have to be added is the update portion, since the current ReactTransitionGroup only tells you enter/leave.
Maybe this is a bad solution to a problem being viewed incorrectly, but as it stands now, I can't make
my implementation of withPositionalContainer
generic because it still depends on context sensitive props
to determine if it should run the update animations. I want it to explicit in saying, hey this item is being
updated in terms of staying in the current list.