diff --git a/examples/with-i18next/components/Post.js b/examples/with-i18next/components/Post.js index 77448f64..bdf8acc0 100644 --- a/examples/with-i18next/components/Post.js +++ b/examples/with-i18next/components/Post.js @@ -2,15 +2,12 @@ import React from 'react' import { translate } from 'react-i18next' class Post extends React.Component { - constructor (props) { - super(props) - this.t = props.t - } - render () { + const { t } = this.props + return (
- {this.t('namespace1:greatMorning')} + {t('namespace1:greatMorning')}
) }