-
Notifications
You must be signed in to change notification settings - Fork 91
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
Use of <div> fails validateDOMNesting check in certain elements #48
Comments
Hi @exogen , Thanks for this suggestion. I suggest to test it a bit before push a new release to npm. Can you maybe fork the repo, make this change and test it in your app? wdyt? |
I'd suggested to make this configurable, because spans are NOT valid everywhere (try to put them into 'table', for example) |
hmmm... And we can pass the node type as a prop, right? It will look like this
I think it may work. Thanks for the idea, @ai212983 ! |
Thanks everyone for discussion and ideas. Deployed in v3.4.0. Use |
(xposting to☹️ )
react-size-observer
as it's an issue there as wellApologies if someone has brought this up before. I've tried both
react-resize-detector
andreact-resize-observer
, and I'm using them in a way where I need it to live inside elements like<p>
and<span>
sometimes.But React complains about this since it's against the HTML spec:
It seems like the same functionality could be done with
span
as long as it's set todisplay: block
. AFAIK spans are valid everywhere. Would it be worthwhile to switch?The text was updated successfully, but these errors were encountered: