Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* @flow */
- import React from 'react'
- import messages from '../messages'
- import { injectIntl } from 'react-intl'
- import type { IntlShape } from 'react-intl'
- type Props = {|
- children: React.Node,
- intl: IntlShape,
- |}
- export class Foo extends React.Component<Props> {
- render() {
- const { formatMessage } = this.props.intl
- return (
- <React.Fragment>
- <h1>{formatMessage(messages.something)}</h1>
- {this.props.children}
- </React.Fragment>
- )
- }
- }
- export default injectIntl(Foo)
Add Comment
Please, Sign In to add comment