This is the switch operator you can use in your react jsx code:

8-24-24 Update:

const OperatorComponents = (operator:any) =>{
  switch (operator) {
    // case "Addition":
    //   <Addition></Addition>
    //   break;
    case "Subtraction":
      <Subtraction></Subtraction>;
      break;

    case "Multiplication":
      return (
        <Multiplication
          questions={questions}
          setQuestions={setQuestions}
          currentQuestionIndex={currentQuestionIndex}
          checkInput={checkInput}
          checkAnswer={checkAnswer}
          itemsRef={itemsRef}
        />
      );
      break;
    case "Division":
      <Division></Division>;
      break;
    default:
      return <Addition></Addition>

      break;
  }
}
 return (
 
 {operatorParam && OperatorComponents(operatorParam)}
 
);
 

SOURCE: /g/xampp8/htdocs/laravel/StudentTodo/ionic-rowley/ionic-rowleyV2

DOES NOT WORK

{(()=>{
  switch (file.downloaded) {
    case 1:
        return <IonText color="medium">Downloaded</IonText>
      break;
 
    default:
      break;
  }
})
}