react-prismic-cms
v0.3.1
Published
<h2 align="center"> <a href="https://react-prismic-cms.firebaseapp.com/" rel="noopener" target="_blank">React Prismic CMS</a> </h2>
Downloads
82
Readme
Set of declarative components to query content published in the headless CMS prismic.io
Installation
$ yarn add react-prismic-cms
Usage
import React from "react";
import ReactDOM from "react-dom";
import Prismic from "react-prismic-cms/components/Prismic";
import QueryAt from "react-prismic-cms/components/QueryAt";
import Vegetables from "./vegetables";
import "./styles.css";
function App() {
return (
<div className="App">
<Prismic repo="react-prismic-cms">
<QueryAt
path="document.type"
value="vegetables"
component={Vegetables}
/>
</Prismic>
</div>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);