react-flip-toolkit icon indicating copy to clipboard operation
react-flip-toolkit copied to clipboard

Doc Suggestion: mention React Key in troubleshooting

Open mprast opened this issue 2 years ago • 0 comments

Hello! I just finished working on an animation that had on onExit() callback that wasn't working until I added a key prop to my Flipped element. I know key is a React thing and not a react-flip-toolkit thing, but this suggests to me there's something about the way react-flip-toolkit works with react that requires key to be there, some of the time or all of the time (especially since every example seems to use a key prop as well).

It may make sense to add a quick note to the docs advising users to try adding a key prop in case of trouble - I know it's generally best practice to do so, but React only gives a warning and not an error if it's missing, and it's a bit confusing to have things break when all of the library-specific config is correct!

(Love this library btw! It's so, so nice to be able to do complex animations declaratively)

mprast avatar Aug 02 '21 23:08 mprast