react-rotation
react-rotation copied to clipboard
Provide defaultCurrent
To make this component a bit more flexible and SSR friendly, I suggest adding a defaultCurrent prop.
Currently, state.current initializes with 0, always. That means, the only way to influence it, is to call setState, and setState could be called just on a mounted component (in client's browser), after the initial render. And the initial render renders the very first image even if it's not the wanted behavior.
In my use case, I need to have a very specific image as the default one, not the one that comes first in the image collection.
What do you think?
cool, it will be added in https://github.com/andrepolischuk/react-rotation/pull/21