'prop value showing [object Object] and also showing correctly in the same component

<span title={myProp}>{myProp}</span>

In the above html, the myProp in the span displays correctly as: 03/17/2022, 1:21 PM

The myProp assigned to the title attribute displays as [object Object]. Anyone have any idea what's happening here?

myProp is the value output from <FormattedDate /> imported from react-intl

I've a CodeSandbox here: https://codesandbox.io/s/cool-https-tc1l3h

If you hover over the date in the browser you can see [object Object]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source