3 ms·
Agreed. I particularly like the look of their `<Switch>/<Match>` component[1]: <Switch fallback={<div>Not Found</div>}> <Match when={state.route === "hom
by kipple 5y ago
Agreed. I particularly like the look of their `<Switch>/<Match>` component[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%3Cmatch%3E https://www.solidjs.com/docs/latest/api#%3Cswitch%3E%2F%3Cma...
[2] https://github.com/AlexGilleran/jsx-control-statements https://github.com/AlexGilleran/jsx-control-statements
[3] https://github.com/samuelneff/react-control-flow https://github.com/samuelneff/react-control-flow
- 14u2c 5y agoYou could very easily implement that pattern yourself in a react app as a few HoCs. So far I think the react project has done a pretty decent job at limiting the surface area of the API. This seems a bit high level.