Hello I'am trying to render the JSX from my component dynamically, some object from my database have other variables then others. I only want to render the HTML elements when the needed Data is provided. But this i causing me this problem:
Syntax error: Adjacent JSX elements must be wrapped in an enclosing tag (202:38)
. I know it for sure the JSX elements are all closed. I think it is because it is an If statement inside an if statement. thank you in advance for your help.
<div>
{this.state.loading ?(
<div className="wrapper">
<Navbar/>
<Body>
{this.state.snap.someValue ?
(<div className="detailsCategory col-sm-5 col-md-5">
Heading
</div>
<div className="col-sm-5 col-md-5">
<p>{this.state.snap.childValue}</p>
</div>):(null)}
</Body>
</div>)
:
(<h1> LOADING... </h1>)}
</div>