How do you pass a parameter to defineMessages in react-intl?

I have an error message like the one below:

Could not retrieve data: ${e}

How do I convert this to a definedMessage that can accept this error parameter?

A standard definedMessage:

    const messages = defineMessages({
     dataError: {
         id: 'data.error',
         defaultMessage: 'Could not retrieve data: [default message]'


69 thoughts on “How do you pass a parameter to defineMessages in react-intl?”

  1. i need loan urgently in dubai, i need a loan desperately today. i need a loan now with no job need loan i need a loan need a loan but my credit is bad, cash advance loans direct lenders only, cash advance online, cash advance, guaranteed cash advance loans bad credit. Financial affairs will spark banking, terms of the payment .


Leave a Comment