mattrothenberg / vue-flip-toolkit

A Vue.js port of the wonderful react-flip-toolkit by @aholachek
https://keen-davinci-e49eba.netlify.com/
315 stars 17 forks source link

add support for event emit instead of flipKey #35

Open scratchmex opened 3 years ago

scratchmex commented 3 years ago

Maybe add support to force a refresh when emiting certain event instead of the component watching for the flipKey prop. I think this is more suitable for complex scenarios like large list or various components. At first I got trouble understanding the flipKey and I said, why we don't just give it a boolean and flip the value when we want it to refresh it!? but then I realized it will be more readable to support some emit('refresh'). I will be happy to start working on a PR draft but I want to start a discussion as well.

mattrothenberg commented 3 years ago

I don't think I understand the use case of this proposed imperative API.

Why can't you modify the value of flipKey to trigger an animation?