FormidableLabs/renature

New `repeat` api issues

boygirl opened this issue · 3 comments

First of all, thank you for this new feature. It's super ergonomic and easy to use! I noticed a few minor issues (none of which will prevent me from using the feature right away) that I wanted to document.

when repeat is an even number

I would expect the animation to stop cleanly at the from position, but instead it appears to jump back to the to position after completing.
even-numbers

when repeat is undefined

repeat: 0 causes no animation, as expected, but repeat: undefined causes a single animation when the component loads. I would expect all falsey values to behave like repeat: 0

repeat-undefined

when repeat is a string

I didn't read the release notes carefully enough and initially tried repeat: "infinite" instead of repeat: Infinity 😅 This resulted in an animation that started and continued past its to state. It should probably not start at all when the repeat value is an incorrect type
spinny-hand

@parkerziegler on second thought, I think the repeat: undefined behavior is desirable as is

FYI @boygirl the fixes have been released in v0.9.1! Let me know if you have issues with upgrade — ready to help out however I can. The release notes call out the new behavior!

Thanks so much!