Handling Previews in a Headless Architecture

Great explanations!

Did you test it with Strapi V4 ?

I already implemented the preview from a previous blog article, but some pieces were missing such as make Strapi env variable work on the client side.

The part about Next is straightforward, but you just implemented the preview API only for articles, though there’s chance people want it for every content type and handle this need additional logic (both on Strapi and Next).

Also, I have seen Strapi plugins handling this feature but didn’t test it myself, the best would be to add this as a native Strapi feature, as nearly every project needs it in my opinion :slight_smile:

1 Like