AstroJS Integration #10928
Replies: 2 comments 4 replies
-
Well that won't be easy. Payload uses React Server Components, and you can't easily bake in Astro templating there. What could work is to have a custom react wrapper which renders the Astro components, that however wouldnt really work in an interactive way either since Astro, contrary to React, isn't a clientside rendering library.
That part I don't really get. You can totally use pure Astro components in your frontend and don't need to use any React. Payload + Astro frontend works well for me. |
Beta Was this translation helpful? Give feedback.
-
Btw what's on my ToDo-List is to create a Lexical Renderer similar to https://github.com/atelierdisko/payload-lexical-react-renderer. It should work to build this as pure Astro component which uses A pure Astro Component variant would enable using Astro components as Blocks within Richtext Content. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, first of all, Payload is great. Thanks to the developers and every contributor.
For a while now, I've been using Payload with AstroJS, which is the ideal stack for me. Especially Astro's static first approach and optimizations are better fit for my use cases.
However, using the editor provided with Payload, it's not possible to use Astro components. I have to write React components that is present in Payload folder. I should be able to define my components as Astro components, use them in Payload editor, and use the types generated by Payload in Astro directly.
Not being able to use Astro components actually kills one of the most strong abilities of Astro, which isn't ideal in my opinion. At this points, why use Astro?
I'm interested in your opinions on this topic, please share your ideas. Wish you a great day!
Beta Was this translation helpful? Give feedback.
All reactions