Promise Conventions for Happier Developers
Name Promise Functions with getX()
Name Inline Functions with verbs
- Improves readability and debugging
const getName = (dinosaur) => dinosaur.name
const log = (value) => console.log(value)
getDinosaur()
.then(getName)
.then(log)