react-resize-observer
react-resize-observer copied to clipboard
Use of <div> fails validateDOMNesting check in certain elements
Apologies if someone has brought this up before. I'm using react-resize-observer 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:
index.js:2178 Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
It seems like the same functionality could be done with span as long as it's set to display: block. AFAIK spans are valid everywhere. Would it be worthwhile to switch?