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 to initialIndex and index be used for the controlled behaviour.
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
indexis confusing I think it should be renamed toinitialIndexandindexbe used for the controlled behaviour.