croods
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

Croods

Croods is a library that abstracts the REST data layer of your back-end providing you a simple API to integrate it with react applications. A simple "Hello world" would look like this:

Install

yarn add croods react react-dom lodash axios

Usage

// src/App.js

import React from 'react'
import { Fetch } from 'croods'

export default props => (
  <Fetch
    baseUrl="https://dog.ceo/api/breed/beagle"
    name="images"
    parseResponse={response => response.data.message}
    render={list => (
      <div>
        <h1>Hello Beagles!</h1>
        <ul>
          {list.map((item, index) => (
            <li key={index}>
              <img src={item} alt={Beagle  ${index)`}/>
            </li>
          ))}
        </ul>
      </div>
    )}
  />
)

Check out the docs to understand more about it!

Readme

Keywords

none

Package Sidebar

Install

npm i croods

Weekly Downloads

298

Version

3.1.0

License

MIT

Unpacked Size

194 kB

Total Files

28

Last publish

Collaborators

  • guga.guichard
  • felipefreitag
  • danielweinmann
  • devseasoned
  • giovanisleite
  • diogoseasoned
  • peterson.seasoned