It's generally better to define messages inline as arguments of intl.formatMessage(...)
. (Because linting only works that way.)
But this pageH1Message needs to be used in two places. So we assign that message to a variable using defineMessage
, then use that message in two places.
(If we had defined the same message twice inline, we'd have ended up with two identical messages in the translation file, with makes managing translation harder).