X
X
xster2017-11-15 17:18:54
JavaScript
xster, 2017-11-15 17:18:54

Why is the component eating the div element, React?

Good afternoon! Please help me figure out why this is the case with server side rendering in React?
It turns out a different render of the component in such situations

render() {
    return (
      <div className="header hgg" onClick={this.handleClick}> //  в этом случае все нормально
        <div>
          <h1>HEADER!!!!!</h1>
        </div>
      </div>
    )
  }

here is the problem.
render() {
    return (
      <div className="header hgg" onClick={this.handleClick}> .// блок не выводится, хотя видно мигание, появляется и исчезает
        <h1>HEADER!!!!!</h1>
      </div>
    )
  }

Who knows please explain why?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Andreev, 2017-11-15
@DragorWW

I posted a demo here on react 16, everything is fine, can you make a demo where there is a problem?
What versions of the libraries?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question