Reputation: 503
I am getting this error in my whole project and I don't know what to do about that. It is giving the error even when the component like below is not present in the component.
<FormattedMessage {...messages.forexample} />
Mobx, react-intl is being used here.
New Edit
The message I am paassing is in the format
example: {
id: "app.components.cartItem.example",
defaultMessage: 'Items in your cart',
}
Upvotes: 2
Views: 1763
Reputation: 27
In your FormattedMessage component, you need to set a default value on id
FormattedMessage.defaultProps = {
id: 0
}
Upvotes: 2