The new Page Editing preview feature is cool, but looking into the frontend implementation of it i wondered why the draftMode feature of Next.js is not being used.
Draft mode is a feature in Next which is specifically for CMS previewers, for example Sanity uses this with Next.js to preview content. The React Accelerator however uses page revalidation somewhat incorrectly, as that is mostly for purging caches relating to the page. However using draft mode would be more in line with Next.js best practices.
https://nextjs.org/docs/app/building-your-application/configuring/draft-mode
In Next.js draftMode purges each cache and comes with other sorts of features (such as being able to detect if we are in a draft mode or not). While Litium uses GraphQL the fetch does not by default cache any data. But a partner could add its own cache tags which requires special revalidation.
Draft mode also helps with these cases by globally disabling the cache within Next.js. Draft Mode also saves resources in Next.js as it doesn't need to unnecessarily cache data. A bit of an optimization but Next.js draft mode should always be used in scenarios when we are not showing a publically facing page which is not idempotent.
Thank you for your suggestion. However, I would like to know what benefit would the Draft mode bring, when all pages in React accelerator are dynamic rendered?
The reason why we use revalidation is because, we want to purge the page's cache, and ask NextJs to re-render the page, as new data is available.