Generally are using ternary or some if-else
in React.
However, there is a specific...case, if you will 😼, where we will encounter a switch-case
. This is when working with a dispatcher in conjunction with a reducer.
Now, this is just a series on 'pre-react' stuff, so the video doesn't go into all of that...it's just to illustrate an example of switch-case
.
Top comments (0)