Commit f79ad17
eyal0803
Don't pass
When passing custom props to HTML components React will throw a warning that says it doesn't recognize this prop. Since the prop is camel-cased (`shouldAutoFocus`), as opposed to lower-case (`shouldautofocus`), React tries to recognize it instead of just pass it to the DOM element. The solution is the deconstructure it along with the used props so it won't get passed in `{...rest}`.shouldAutoFocus to <input />1 parent 785280c commit f79ad17
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
0 commit comments