aholachek / react-flip-toolkit

A lightweight magic-move library for configurable layout transitions
MIT License
4.1k stars 139 forks source link

Flipper interface has onComplete, but not onStart #197

Closed tkriplean closed 2 years ago

tkriplean commented 2 years ago

I'd like to do some stuff when a Flipper is triggered. Unfortunately, Flipper's onStart callback is not exposed in the interface.

Curiously, Flipper does have an onStart callback (https://github.com/aholachek/react-flip-toolkit/blob/master/packages/flip-toolkit/src/Flipper.ts#L41), but it is not exposed in the interface (https://github.com/aholachek/react-flip-toolkit/blob/master/packages/flip-toolkit/src/Flipper.ts#L24).

In a fork, I added onStart to the Flipper's interface (https://github.com/tkriplean/react-flip-toolkit/commit/45ea538ae2d146e2beda904d477347894c234d47). It seems to be working.

Was onStart ommitted from the Flipper interface on purpose, or was it an oversight?

If it is an oversight, I would be happy to put together a pull request to contribute back to this awesome library. If it was purposely omitted, I'm curious what the dangers of using it are.

Thanks, Travis

aholachek commented 2 years ago

Hi Travis,

It just was a mistake--I'd happily merge a pr with your change if you want to make one and then release a patch version.