prismic-react
prismic-react
provides compile-to-ReactElement methods for document & fragment types in the prismic.io JavaScript SDK.
Quick start
npm install --save prismic-react
// just import prismic-react to add the .asReact methods everywhere there// are .asHtml methods; myDocument; // it supports passing a link resolver just like .asHtmlmyDocument; // documents also support getting fragments as reactmyDocument; // which is just shorthand for calling .asReact on the fragments themselvesmyDocument;
That's literally all there is to it.
License
Apache 2.0