martinandert / react-translate-component

A component for React that utilizes the Counterpart module to provide multi-lingual/localized text content.
MIT License
322 stars 31 forks source link

Translate tag spams warnings in react 15.2.0 #21

Closed nitelite closed 8 years ago

nitelite commented 8 years ago

What did you do?

use Translate component with the property content ex: <Translate className="label-content" content={ translateKey }/>

What did you expect to happen?

react 15.2.0 not to throw warnings

What actually happened?

spams Unknown Prop Warnings

ex:

warning.js:44 Warning: Unknown prop component on tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop in span (created by Translate) in Translate (created by InputElement) ...

What version of this module are you using?

0.11.0

martinandert commented 8 years ago

Hey @nitelite, thanks for reporting! This should be fixed in v0.11.1. Enjoy!

thomasparsons commented 8 years ago

@martinandert I still get the warnings, on v15.2.1 of react, and v0.11.1 of react-translate-component

nitelite commented 8 years ago

The errors seems to have stopped for me, but the same type of error is also thrown by the Interpolate component that Translate uses if you have interpolation in your translation, but I guess that will have to be solved by someone updating the Interpolate component, if I am not mistaken.

I don't have the error in front of me at the moment, but I remember seeing a warning that suggested this at least.

martinandert commented 8 years ago

Thanks for shedding more light on it, @nitelite. I'll take a look at the interpolate component soon.