How to make three state judgments gracefully in js react,vue template

condition:1?2 can only judge two states. I render three nodes with three if

.
Aug.12,2021

condition===1?'a':condition===2?'b':'c'

I don't quite understand the title
if you are rendering tag, you can only use if-else
if you are rendering text, it is similar to this: [condition]

Menu