@wapps/react-contentful

0.0.5 • Public • Published

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

Dependents (0)

Package Sidebar

Install

npm i @wapps/react-contentful

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

9.85 kB

Total Files

8

Last publish

Collaborators

  • hupe1980