open -b me.damir.dropover-mac "your filename"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a random background to the component | |
// On a re-render, the component gets a new color | |
// Source of this snippet: https://kyleshevlin.com/using-react-memo-to-avoid-unnecessary-rerenders | |
const random255 = () => Math.floor(Math.random() * 255) | |
const randomRGBA = () => { | |
const r = random255() | |
const g = random255() | |
const b = random255() |
OlderNewer