Set of declarative components to query content published in the headless CMS prismic.io
$ yarn add react-prismic-cms
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);