Prismic and GATSBY, some issues and fixes

Hello Adrian,

Thanks for pointing out this to us.

We indeed need to update this documentation. Meantime, you can follow our up-to-date example project where we have fixed issues with those files.

You can launch this project code by running the theme command.

import * as React from 'react'
import { PreviewStoreProvider } from 'gatsby-source-prismic'

export const wrapRootElement = ({ element }) => (
  <PreviewStoreProvider initialEnabled={true}>{element}</PreviewStoreProvider>
)

Let me know if you have any doubt.

Thanks,

Priyanka