Skip to content

Set of declarative component to query content published in the headless CMS prismic.io

Notifications You must be signed in to change notification settings

reiniergs/react-prismic-cms

Repository files navigation

Set of declarative components to query content published in the headless CMS prismic.io

CircleCI License: MIT npm version

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);

Edit 4x20k907n0