Skip to content
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

<div> cannot appear as a descendant of <p> #249

Closed
uragecz opened this issue Jul 28, 2016 · 2 comments
Closed

<div> cannot appear as a descendant of <p> #249

uragecz opened this issue Jul 28, 2016 · 2 comments

Comments

@uragecz
Copy link

uragecz commented Jul 28, 2016

Hi, i am getting a lot of errors -

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. See App > p > ... > Print > div. /:44:9

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. See App > p > ... > Print > Graph > div. /:44:9

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. See App > p > ... > Print > Graph > Columns > div. /:44:9

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. See App > p > ... > Print > Graph > Columns > Inputs > div. /:44:9

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. See App > p > ... > Print > Graph > Columns > Inputs > Input > div. /:44:9

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. See App > p > ... > Print > Graph > Grid > div.`

I repaired on with replace return(

) with return(null) but others i cant. So what i have to do ?

@ForbesLindesay
Copy link
Contributor

This is a constraint of browsers. You should use div or article or something like that in the render method of App because that way you can put whatever you like inside it. Paragraph tags are limited to only containing a limited set of tags (mostly tags for formatting text. You cannot have a div inside a paragraph

@uragecz
Copy link
Author

uragecz commented Jul 28, 2016

Nice, it helped, thanks a lot for fast answer 👍

@uragecz uragecz closed this as completed Jul 28, 2016
nicosommi pushed a commit to nicosommi/create-react-app that referenced this issue Mar 17, 2018
* feat(react-scripts/prod): use new uglifyJsPlugin for ES6 support

this closes facebook#21, facebook#158, facebook#248

* feat(react-scripts/prod): execute uglify plugin parallel + enable caching
@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants