I use react 0.13.3 with babel 5.8.26. I noticed it started rendering strange markup. This is what I have in js file:
<p className="navbar-text navbar-right dropdown hidden-xs">
<a className="navbar-link dropdown-toggle" href="#" id="accountddl" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i className="st st-profile st-2"></i></a>
<ul className="dropdown-menu" aria-labelledby="accountddl">
<li><a href="#">Action</a></li>
</ul>
</p>
You can see the output there.
But what it renders back is this:
<p class="navbar-text navbar-right dropdown hidden-xs" data-reactid=".0">
<a class="navbar-link dropdown-toggle" href="#" id="accountddl" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-reactid=".0.0">
<i class="st st-profile st-2" data-reactid=".0.0.0"/>
</a>
</p>
<ul class="dropdown-menu" aria-labelledby="accountddl" data-reactid=".0.1">
<li data-reactid=".0.1.0">
<a href="#" data-reactid=".0.1.0.0">Action</a>
</li>
</ul>
<p/>
As you can see it closes the p tag before rendering ul and in the end it attaches a self-closed p tag.
How to make ul a part of one parent p tag? Am I doing something wrong?
If I change p to div it works as expected - result
Update
Thanks to the guys comments. I realized that this is not valid HTML. React is good and does its job well. So, when the browser sees the case, it decides to break it the way shown above.