I am using React Intl for my internalization and have to write this.props.intl.formatMessage({id: 'some.message.id'}, values)
to get a translated string in the render() method.
Now, how should a decorator look like to provide a shortcut function for this so I could do like _t('some.message.id', values)
or similar?
I know I could probably just write another class that extends React.Component or wrap the component in another class or whatsoever, but I'd like to do it with decorators (for learning and understanding purposes), if it's possible to do so.