Transform set by react component is invalid

  css3, question
JSX:
 style={this.state.expand == index ?  {transform: 'rotate(180deg)', backgroundColor: 'black'} : null}

With background color effect and no chrome
If it is written on a style sheet, the class can have a style if it is not dynamically updated.
Is it a component life cycle problem?

Supplementary picture @michael_cai
@michael_cai:
I changed the way, writing between the lines is also not good, the browser display style sheet also has
图片描述

This has nothing to do with react.

You will know if the style sheet of the element you operate has the style you want.

In fact, you are simply adding a class to dom elements here. As long as dom elements have this class, it means that there is no problem with your react writing here. It can only be a matter of style.