#Migrate huge Switch/Case for Partial hydration to Astro

3 messages · Page 1 of 1 (latest)

slim trout
#

I have huge switch/case block (~50 components) that renders CMS Components but I'd like to enable partial hydration for some of them. Therefore I need to move that Block from React/Tsx to Astro but I don't really understand how 😅

Help / inspiration appreciated

slim trout
#

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.
gentle fern