Change:
Do you want to request a feature or report a bug? Bug What is the current behavior? The size prop can only be a number and I think this should be true for inputs and selects but not necessarily true for the rest of HTML tags or web components. If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle () or CodeSandbox () example below: Sorry, it's a CodePen. This example uses a framework called OnsenUI that internally uses web components. In the OnsenUI framework there is an icon web component that transforms every size prop value into a string which is not attached to the DOM. I know that the example has more dependencies than React, BUT there is also a simple div (as simple as this ) which is also affected by this issue. What is the expected behavior? The size prop should be to the DOM when it is not a number on HTML tags that aren't inputs and selects. Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? The affected versions are = 16.3 It works ok in versions <= 16.2 Browsers: All
The size prop can only be a number and I think this should be true for inputs and selects but not necessarily true for the rest of HTML tags or web components. What are the HTML tags that have a attribute except inputs and selects? With web components I am not seeing the issue: <img width="227" alt="screen shot 2018-04-26 at 7 51 53 pm" src="https://user-"
the attribute is an HTML attribute, not something that React provides. According to the HTML spec, is only allowed on and elements
I don't know why I wrote "rest of HTML tags", my bad . The example you provided works ok, but if I add something that doesn't seems like a valid size then it doesn't work. For example: Value | Works -------|------- 100 | Yes 10px | No 10e1 | Yes -1 | No Something changed in 16.3. Version 16.3 <img width="853" alt="captura de pantalla 2018-04-26 a las 21 36 43" src="https://user-"Version 16.2 <img width="855" alt="captura de pantalla 2018-04-26 a las 21 37 10" src="https://user-" I suppose that it's fine to filter props when not passing the appropriate values when using HTML tags but I suppose that in web components the size attribute can be anything. Am I wrong? What do you think?
The web component code path shouldn't reject any attributes. If it does it's a bug.
The bug is . Before the we should add something like Please send a PR :-)
Ok, I will work on this tomorrow. I'm heading to bed. Thanks for your quick response.
Couldn't wait
Should be fixed in React 16.4.

Discussion:
expect(container.firstChild.getAttribute('value')).toBe('foo'); expect(container.firstChild.value).toBe('foo'); }); <ins> it('should not remove attributes for custom component tag', () => { const container = document.createElement('div'); ReactDOM.render(<my-icon size="5px" />, container); expect(container.firstChild.getAttribute('size')).toBe('5px'); }); </ins> }); });

) { return true; } <ins> if (isCustomComponentTag) { return false; } </ins> if (propertyInfo !== null) { switch (propertyInfo.type) { case BOOLEAN: