DEV Community

Manav Misra
Manav Misra

Posted on

1

`switch-case`

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay