DEV Community

Manav Misra
Manav Misra

Posted on


Generally are using ternary or some if-else in React.

However, there is a, 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's just to illustrate an example of switch-case.

Top comments (0)