Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

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 methodsimport'prismic-react';myDocument.asReact();// it supports passing a link resolver just like .asHtmlmyDocument.asReact(linkResolver);// documents also support getting fragments as reactmyDocument.getReact('article.summary'/* , linkResolver */);// which is just shorthand for calling .asReact on the fragments themselvesmyDocument.getStructuredText('article.summary').asReact();

That's literally all there is to it.

License

Apache 2.0

About

Compiling Prismic.io content to ReactElements

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages