I'm trying to understand what is the best way to use props in React
Let's say I have a container that use import {FormattedMessage} from 'react-intl'
And let say I have a component used in the JSX of the container.
Now, If I wanted to use FormattedMessage in the component also, Should I use import again in the component? or should I send FormattedMessage as a prop to the component via the container?
Example:
import {FormattedMessage} from 'react-intl';
class Container {
render() {
return (
<Component formattedMessage={FormattedMessage} />
);
}
}