Reputation:
I get an Error when I add maxLength to input,Invalid DOM property maxlength
. Did you mean maxLength
?https://codesandbox.io/s/nkz2kwl7y0
Upvotes: 1
Views: 2707
Reputation: 2265
Class names and attributes in reactjs are camelCased
. You should use maxLength
instead of maxlength
Upvotes: 0
Reputation: 1823
This is because in jsx html attributes are in camelCase
Please check supported html attributes in reactjs
Upvotes: 7