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
FAB when rendered on web Warning: validateDOMNesting(...): <button> cannot appear as a descendant of <button>. #3857
Comments
We see this happening with Chip and Button, as well. Put an Icon on a Chip or a Button, for example:
and you will get a message like this in your web browser:
What's the best advice on what to do about this? |
I am facing this same issue, it's even hard to find the file which is causing this. issue |
This happens because To resolve this (until it can be fixed from source), I can suggest two approaches:
|
To fix the underlying issue, I would like to propose the following:
|
Is there an existing issue for this?
Explain what you did
I added the following to my app:
Expected behavior
This works fine on mobile devices but when tested as web site, my browser throws the following warning:
Describe the bug
I added the following to my app:
This works fine on mobile devices but when tested as web site, my browser throws the following warning:
If I inspect the elements then it looks like both the icon is wrapped in a button which in turn is wrapped again in another button nearer to the Fabs container level which causes this warning.
Suggest that only the outer button is needed and not one wrapping the icon as well.
Steps To Reproduce
Screenshots
No response
Your Environment
`npx @rneui/envinfo`
Global Dependencies:
No related dependency found
Local Dependencies:
@rneui/base : ^4.0.0-rc.7
@rneui/themed : ^4.0.0-rc.8
expo : ~49.0.13
react : 18.2.0
react-native : 0.72.6
@types/react : ~18.2.14
The text was updated successfully, but these errors were encountered: