What does this code for the steps component in react.js mean?

What does this code for the steps component in

react.js mean?

<Steps progressDot current={state ? state[0] ? state[0] : null : null}
          status={this.checkStatus(state ? state[1] ? state[1] : null : null)}>
       ......   
</Steps>
Apr.11,2021

that's probably what it means

state && state[0] ? state[0] : null

is equivalent to
state? (state [0]? State [0]: null): null
MDN has a good explanation. The important point about
is that although the conditional operator is combined to the right, the order in which it is evaluated is the


ternary control character of from left to right to prevent null values. For example, data = [], wouldn't it be undefined to take data [0] directly


if (state){
    if (state[0]){
        return state[0]
    } else {
        return null
    }
} else {
    return null
}
Menu