Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"autofocus" prop in TodoHeader's input is an "unknown prop" #8

Open
rouzazari opened this issue Sep 16, 2016 · 1 comment
Open

"autofocus" prop in TodoHeader's input is an "unknown prop" #8

rouzazari opened this issue Sep 16, 2016 · 1 comment

Comments

@rouzazari
Copy link

First of all, thanks for the great tutorial and accompanying github repo.

Description

I noticed this error when walking through your tutorial. While "autofocus" is an HTML attribute for , you will get an error message in react 15.3.1 (and possibly other versions).

Warning: Unknown prop autofocus on tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in input (created by TodoHeader)
in header (created by TodoHeader)
in TodoHeader (created by TodoApp)
in section (created by TodoApp)
in div (created by TodoApp)
in TodoApp

Fix

The fix is simple: it should be autoFocus (camelCase wins in JSX). I can submit a simple PR to fix the issue, or I'll leave it to you.

@rouzazari
Copy link
Author

With react 0.14.7 (as specified in your packages.json) the error message does not appear; however, the autofocus feature does not work unless you use camelCase, i.e. it should read autoFocus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant