Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Latest commit

 

History

History

react-contentful

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

react-contentful

Build Status

React contentful components

Installation

npm install --save @wapps/react-contentful

How to use

import React from 'react';
import Contentful, { Entries } from '@wapps/react-contentful';

const App = () => (
  <Contentful space="<your sapce>" accessToken="<your aceessToken>">
    <Entries query={{ content_type: 'category', limit: 5 }}>
      {({ entries }) => (
        <ul>
          {entries.map(({ fields }, i) => (
            <li key={i}>{fields.title}</li>
          ))}
        </ul>
      )}
    </Entries>
  </Contentful>
);

export default App;

Live Demo

For a demo, check out https://hupe1980.github.io/wapps-components/

License

MIT