/live-preview-next-js-api-example

This is a POC on how we can implement Live Preview using Contentstack API using Next js.

Primary LanguageJavaScriptMIT LicenseMIT

Next JS implemenation of Live Preview using Contentstack API (POC)

How to use:

  1. Create a entry with necessary fields.
  2. Create next.config.js using the next.config.sample.js
  3. Using Contentstack API, fetch that entry.
  4. Using post messages, initialize live preview and listen for the live preview hash.
  5. Make an API call for the upadted entry with received Hash value and content_type_uid.
  6. Update the state.

What have we done:

This is a POC of how to use Live Preview using Contentstack API using Next js.