You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

axios-render-prop

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-render-prop

axios-render-prop React component

1.0.2
latest
npmnpm
Version published
Maintainers
1
Created
Source

Consume Axios in a Declarative way, using JSX

A wrapper React component which uses axios internally to make API calls.

yarn add axios
yarn add axios-render-prop

Example:

import Axios from "axios-render-prop";

// ...

<Axios url="https://api.github.com/users/sanketsahusoft">
  {({ loading, error, response }) => {
    return (
      <div>
        {loading ? <div>Loading</div> : <div>Name: {response.data.name}</div>}
      </div>
    );
  }}
</Axios>;

Keywords

react-component

FAQs

Package last updated on 19 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts