From b0128c7e2d55883163c80cc4ba9cae9f7e8b1586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Lobos?= Date: Wed, 16 May 2018 06:10:01 -0400 Subject: [PATCH] Fix "with-i18next" example (#4393) * Fix "with-i18next" example Fixes #4380 * Trailing space removed --- examples/with-i18next/components/Post.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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')}
) }