如果在React JSX中是多个

我有一种情况,我需要基于多个条件将类添加到div元素中,在这里我使用三元运算符达到嵌套级别

    <div className={
          typeof this.state.weather.main !== "undefined"
               ? this.state.weather.main.temp > 16
                     ? "app warm"
                     : "app cold"
                : "app"
             }
          >

我想吃点东西,

         if(this.state.weather.main.temp < 16){
           //add "app cold" class
          } else if(this.state.weather.main.temp > 16){
           //add "app warm" class
          } else if (this.state.weather.main.temp > 35){
             //add "app hot" class
            } else if(this.state.weather.main.temp > 50){
               //add "app extreme" class
             }
             .....

等等