This is a straight up question, but in a switch
statement is it ok not to return a default
state?
The switch statement is in a React Component and looks like this.
const App = (chosenTeam) => {
const renderSection = (team) => {
switch (team) {
case 'LFC':
return <Liverpool />;
case 'MUFC':
return <TerribleTeam />;
case 'Chelsea':
return <Blues />;
}
}
return {renderSection(chosenTeam)}
}