News for hackers. Stuff that matters.
Re:Show HN: redeuceur – A utility for creating terse Redux r... by acemarke on Wednesday July 05, 2017 @11:19AM (#14703077)
No, I genuinely don't understand why people hate switch statements :) Like I said in the post, a switch statement is a construct designed to implement if/else logic on the value of a single field, and since we usually want to do work based on the value of `action.type`, a switch statement is the obvious choice.

Now, I personally tend to use a function map utility in my own Redux code, but there's definitely nothing _wrong_ with switch statements, and I don't get the vehement complaints about them.

There are no comments on this comment yet.