Using SliceMachine NextJS and PageBuilder components with other React frameworks (eg. Shopify Hydrogen)?

I want to use Prismic SliceMachine and PageBuilder to get the best content authoring experience for editors while using Prismic.

How would I be able to use components built with these in non-NextJS (but still ReactJS) projects? Would I be able to publish a reusable SliceMachine library from the NextJS
I'm specifically interested in using it in Shopify Hydrogen (Remix framework).

Hi @bryan1 ,

You can still build your Slices in Slice Machine in Next.js mode, but you'll just need to be aware not to use suggested components like PrismicNextImage and PrismicNextLink when templating the content.

You'll also need to replace the use of the Next Slice Zone component with the React Slice Zone instead.

Other than that you shouldn't have any issues I believe.

Thanks.

Thank you for the response @Phil! I will take that advice into account. I'll try to remember to post back here any updates with my experience that may be relevant to others implementing a similar setup.

1 Like