['red', 'blue', 'yellow'].find((d, i) => i === Math.round(Math.random() * 2))
That's not a safe way to pick a random color from an array.`Math.round(Math.random() * 2)` might produce the following sequence: 2, 2, 0. The find callback is called with 0, 1, 2, so it returns nothing.
Maybe they were going for:
['red', 'blue', 'yellow'][Math.round(Math.random() * 2)]
If they intended for `undefined` or `null` to be a valid result, then it would be better to write: ['red', 'blue', 'yellow', null][Math.round(Math.random() * 3)]
Haha, I submitted a PR: https://github.com/tannerlinsley/react-move/pull/1