Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 1.09 KB

File metadata and controls

16 lines (15 loc) · 1.09 KB

🧑‍🚀 Problems I faced with Astro

  1. Can't use SolidJS polymorphics with components that require hydration
    The component passed in the as prop is not considered as a client component, so it wouldn't hydrate.
    ⭐ Solution: Create a wrapper Solid component to use in Astro with client: directives
  2. Props spread doesn't work as expected
    Spread props need to come first to OVERRIDE other props, not the other way around.
  3. onClick and onclick results in silent hydration errors
    This is a limitation mentioned in the documentation.
    ❓ Workaround: Use on:click instead of onClick or onclick. Not sure why this works.
  4. Navigation results in whole page swaps
    This is annoying, but it's workable.
  5. Contexts don't work
    ...and it never will, because of the Islands architecture.
    • If you need contexts, your component tree needs to be fully client-side.
    • If you need global contexts, you need to use a state management library.