joshwcomeau / react-flip-move

Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.
http://joshwcomeau.github.io/react-flip-move/examples
MIT License
4.09k stars 258 forks source link

Fix weak types in libdef #185

Closed Hypnosphi closed 7 years ago

Hypnosphi commented 7 years ago

This is a follow-up to #183

It turned out that the way I used react types in libdef file leads to all of them coercing to any (see https://github.com/flowtype/flow-typed/issues/1209#issuecomment-326756417)

This PR fixes that, plus restricts children types to react elements, and items filtered out by Children.toArray (those include undefined, null, and booleans)

I also made a PR to flow-typed with new libdef, so that it's available for external usage: https://github.com/flowtype/flow-typed/pull/1210