react-prismic-cms

0.3.1 • Public • Published

React Prismic CMS

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-prismic-cms

Weekly Downloads

5

Version

0.3.1

License

MIT

Unpacked Size

1.03 MB

Total Files

124

Last publish

Collaborators

  • reiniergs
  • jltorress