#Migrate huge Switch/Case for Partial hydration to Astro
3 messages · Page 1 of 1 (latest)
I want with a lot of
block.type === "cmsBlogListTeaserSection" && (
<CmsBlogListTeaserSectionComponent {...block} />
)
}``` Statements and it works for now. Doesn't look that clean, but solves the problem for now.
If your looking for a cleaner solution I have a <Switch> component that you may be interested in: https://github.com/BryceRussell/astro-headless-ui/wiki/Switch