Date object passed as prop becomes [object Object] instead of [object Date]

Solution 1:

When an object is converted to a string, it is converted as "[object Object]". If you want to console log an object use the JSON.stringify() function.

Example:

console.log(`props.dateProp: ${JSON.stringify(props.dateProp, null, '\t')}`)