React: Warning: Unknown DOM property autocomplete. Did you mean autoComplete?

Created on 19 Jan 2015  路  4Comments  路  Source: facebook/react

I'm not sure what counts as a canonical source, but as near as I can tell, the autocomplete input property should be all downcased. I've been having some trouble with form input showing up in Firefox after a refresh and noticed that I had autoComplete='off'. Not sure if that will have an effect on the functionality, though.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

Most helpful comment

React requires camelCasing for DOM attributes, even though the DOM attributes are lower-cased or sometimes hyphenated. However, React always output the correct DOM attribute name in the markup, so unless you're seeing something else, everything is as it should.

https://github.com/facebook/react/blob/master/src/browser/ui/dom/HTMLDOMPropertyConfig.js#L47
https://github.com/facebook/react/blob/master/src/browser/ui/dom/DOMProperty.js#L93

All 4 comments

React requires camelCasing for DOM attributes, even though the DOM attributes are lower-cased or sometimes hyphenated. However, React always output the correct DOM attribute name in the markup, so unless you're seeing something else, everything is as it should.

https://github.com/facebook/react/blob/master/src/browser/ui/dom/HTMLDOMPropertyConfig.js#L47
https://github.com/facebook/react/blob/master/src/browser/ui/dom/DOMProperty.js#L93

you have to make use of camelcase.React in the console I think it shows you.
It would be like this:
autoComplete

@syranide, both https://github.com/facebook/react/ links are broken.

Was this page helpful?
0 / 5 - 0 ratings