Today I Learned

A Hashrocket project

Use object spread operator to get remaining values

const props = { width: 10, height: 10, color: 'red' }
const { width, ...rest } = props

// width => 10
// rest => { height: 10, color: 'red' }
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.