Open Jastrzebowski opened 2 days ago
Thank you, @adrai! The test is different than the examples in the documentation with custom components. The corresponding one I was looking at yesterday is: https://github.com/i18next/react-i18next/blob/badba254ccdd16145f5b0628babaad1efffc8448/test/trans.render.spec.jsx#L131
Would that mean the costume tags were never meant to have overwriteable props?
Feel free to provide a PR for that.
https://github.com/i18next/react-i18next/blob/badba254ccdd16145f5b0628babaad1efffc8448/test/trans.render.spec.jsx#L91 if the code has no prop it should pick from translation string...
honestly...idk...but setting props from translations is another pandora's box
If I remember right sole reason to introduce this was to allow for some keepBasicHtmlTags
that contained links...but not to allow full props replacement (therefore also component props if existing win over translations)
Documentation issue
I have an issue with the
Trans
Component Overriding React component props behaviour. I checked theTrans
tests, and there is no test for Overwriting props; once I add one, it's failing. Is it a feature removed from the code but left in the documentation?For
Existing behaviour
Expected behaviour
Motivation
I want to fix the flows in the documentation and, at best, bring back the props substitution. The use case with links seems valuable, especially when using Routing. However, I can see additional ones, such as using icons as a component.