Leads to repetitive and harder to read code, just use an enum for this in the component and a switch statement.
Moreover, the identifiying functions are scattered all over the place, just have a module for ascertaining the type and then pipe the result into an enum to a module that acts on that result.
Leads to repetitive and harder to read code, just use an enum for this in the component and a switch statement.
Moreover, the identifiying functions are scattered all over the place, just have a module for ascertaining the type and then pipe the result into an enum to a module that acts on that result.