You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using T.$() within a React context, each applied replacement requires a React key in the replaced react tag, or a key error will throw. This is easy enough to fix in a a simple string, but if you are replacing multiple spots in the same string with a single replacement, you'll end up with key issues regardless.
Instead of the following:
T.$<ReactNode>("Some text <bold>that should be be bolded</bold> with more text that is also <bold>emphasized</bold>",{bold: (text)=>(<strongkey="i-will-be-duplicate">{text}</strong>),},)
getting something like:
T.$<ReactNode>("Some text <bold>that should be be bolded</bold> with more text that is also <bold>emphasized</bold>",{bold: (text,index)=>(<strongkey={`no-duplicate-${index}`}>{text}</strong>),},)
The text was updated successfully, but these errors were encountered:
When using
T.$()
within a React context, each applied replacement requires a React key in the replaced react tag, or a key error will throw. This is easy enough to fix in a a simple string, but if you are replacing multiple spots in the same string with a single replacement, you'll end up with key issues regardless.Instead of the following:
getting something like:
The text was updated successfully, but these errors were encountered: