27/11/2017 Development / java script

Agora que eu comecei a migrar a Odete de ANGULAR5 pra REACT, comecei a traduzir o ngClass.

Exemplo usando ANGULAR

<div class="container-fluid how-works" [ngClass]="{'how-works-hidden' : data.length > 0}">

Exemplo usando REACT

es6 transpiler 

<div className={`container-fluid how-works ${this.state.data.length > 0 ? 'how-works-hidden' : ''}`}>