loading...

Discussion on: 14 Beneficial Tips to Write Cleaner Code in React Apps

Collapse
zarabotaet profile image
Dima
const removeFalseyImages = (images = []) => images.reduce((acc, img) => (img ? [...acc, img] : acc), [])

const removeFalseyImages = (images = []) => images.filter(Boolean)

Sorry don't read the whole article after this🀒😱