It doesn’t necessarily have the same benefits in React, but folks ought to consider using components for control flow, like SolidJS does[1].
<Switch fallback={<div>Not Found</div>}>
<Match when={state.route === "home"}>
<Home />
</Match>
<Match when={state.route === "settings"}>
<Settings />
</Match>
</Switch>
Which doesn't seem to have an analog in the React babel-plugin[2] or standalone lib[3][1] https://www.solidjs.com/docs/latest/api#%3Cswitch%3E%2F%3Cma...