top | item 41661944

(no title)

toinewx | 1 year ago

Cannot use React UI lib with Astro such as Mantine. With Gatsby it was possible.

Astro is MPA while Gatsby provided SPA-like navigation.

That's why Astro is not really a replacement.

discuss

order

jwngr|1 year ago

Not a full replacement in all scenarios. But for my personal website with a basic blog, Astro is by far the simpler and more maintainable option. I bet that is true for most people here who maintain their own personal website.

cmgriffing|1 year ago

This is a bit misleading. You are only prevented from using UI libs that use a Provider/Context (like Mantine does) since Astro does not support Context.

Things like shadcn/ui work fine, even when statically rendered.

jaredcwhite|1 year ago

You could just slap on any library like Swup.js, Turbo, etc. and get SPA-like fast navigation out of a regular "MPA" Astro site. And that's true for any MPA, actually.

In addition, I believe Astro now has their own solution for this, though I haven't tried it personally: https://docs.astro.build/en/guides/view-transitions/

kcrwfrd_|1 year ago

You can achieve SPA-like navigation in Astro with their transitions API, but if that’s what you’re after it’s better to use Next.js or Remix IMO.

(I helped build playboy.com/magazine with Astro, which uses the transitions API for this SPA-like behavior… as well as playboy.com/app (nsfw) with Next.js)