Open esamattis opened 8 years ago
I don't think this can every be fully stateless do to Animated.View
and PanResponder
. We should definitely either rename prop or add in componentWillReceiveProp
. Do you want to wipe up a concept of a controlled component?
I will send you a pull request soon for this. And true, you're right it cannot be fully stateless. Animations must have state but the index doesn't which is what actually matters.
I'm keeping my state in Redux store so having extra state inside this component causes weird bugs.
I think this should work like controlled/uncontrolled inputs in standard React: https://facebook.github.io/react/docs/forms.html
Also the prop
index
is confusing I think it should be renamed toinitialIndex
andindex
be used for the controlled behaviour.