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
With new support for SVG elements, added on react 15.0.0, format attribute is considered by the renderer a valid HTML attribute, resulting in the element being rendered with the content of the format prop, which in this case it is the raw output of the function being passed.
I would suggest to remove format (and consequently every other unnecessary prop) from the props passed to React.createElement on render method. This could be easily accomplished on the destructuring assignment:
Although this is a quick fix, I would suggest to rename format to something like formatValue, but it is up to you, since would lead to a breaking change. IMHO it would be a better solution in order to avoid conflicts with SVG's format attribute (considering the fact that this component supports SVG).
The text was updated successfully, but these errors were encountered:
joaogranado
changed the title
Conflict with format prop and svg format attribute
Conflict with format prop and SVG format attribute
May 26, 2016
With new support for SVG elements, added on react 15.0.0,
format
attribute is considered by the renderer a valid HTML attribute, resulting in the element being rendered with the content of the format prop, which in this case it is the raw output of the function being passed.I would suggest to remove
format
(and consequently every other unnecessary prop) from theprops
passed toReact.createElement
onrender
method. This could be easily accomplished on the destructuring assignment:Although this is a quick fix, I would suggest to rename
format
to something likeformatValue
, but it is up to you, since would lead to a breaking change. IMHO it would be a better solution in order to avoid conflicts with SVG'sformat
attribute (considering the fact that this component supports SVG).The text was updated successfully, but these errors were encountered: