mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
update-unknown-warning-page - add a reason for the warning (#8131)
* update-unknown-warning-page - add a reason for this warning * Minor tweaks
This commit is contained in:
committed by
Dan Abramov
parent
3ecb587b82
commit
8a54f20ee1
@@ -13,6 +13,8 @@ There are a couple of likely reasons this warning could be appearing:
|
||||
|
||||
3. React does not yet recognize the attribute you specified. This will likely be fixed in a future version of React. However, React currently strips all unknown attributes, so specifying them in your React app will not cause them to be rendered.
|
||||
|
||||
4. You are using a React component without an upper case. React interprets it as a DOM tag because [React JSX transform uses the upper vs. lower case convention to distinguish between user-defined components and DOM tags](/react/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized).
|
||||
|
||||
---
|
||||
|
||||
To fix this, composite components should "consume" any prop that is intended for the composite component and not intended for the child component. Example:
|
||||
|
||||
Reference in New Issue
Block a user