# react-ipfs-provider

> react-ipfs-provider React component

Latest version **1.0.6** (published 2020-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-ipfs-provider
pnpm add react-ipfs-provider
yarn add react-ipfs-provider
bun add react-ipfs-provider
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2020-10-28 |
| First published | 2020-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 22.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | thetechcompany |
| Keywords | react-component |

## Links

- npm: https://www.npmjs.com/package/react-ipfs-provider
- Repository: https://github.com/TheTechCompany/react-ipfs-provider
- Homepage: http:
- npm.io page: https://npm.io/package/react-ipfs-provider

## Dependencies (3)

- [ipfs](https://npm.io/package/ipfs.md) ^0.50.2
- [ipfs-provider](https://npm.io/package/ipfs-provider.md) ^1.1.0
- [ipfs-http-client](https://npm.io/package/ipfs-http-client.md) ^47.0.1

## Recent versions

- 1.0.6 (latest) — 2020-10-28
- 1.0.5 — 2020-10-27
- 1.0.4 — 2020-10-27
- 1.0.3 — 2020-10-27
- 1.0.2 — 2020-10-27
- 1.0.1 — 2020-10-27
- 1.0.0 — 2020-10-25

## README

# react-ipfs-provider

[![npm package][npm-badge]][npm]

IPFS Context Provider for React, all the fun of IPFS with as little prop
drilling and double locking repo's as possible

## Install

With NPM 

```
npm i --save react-ipfs-provider
```

With Yarn

```
yarn add react-ipfs-provider
```

## Usage

App.js

```javascript
import React from 'react';
import Component from './component';
import { Provider } from 'react-ipfs-provider';

export default function App(props){
  return (
    <Provider ipfs={/* optional ipfs node prop */}>
      <div>
        <Component />
      </div>
    </Provider>
  );
}

```

Component.js

```javascript
import React from 'react';

import { withIPFS } from 'react-ipfs-provider';

function Component(props){
  
  React.useEffect(() => {
    props.ipfs.add('Content to IPFS')
  }, [])
  
  return (
    <div>
      {props.ipfs.provider.id} 
    </div>
  );
}

export default withIPFS(Component)
```

[npm-badge]: https://img.shields.io/npm/v/react-ipfs-provider.png?style=flat-square
[npm]: https://www.npmjs.org/package/react-ipfs-provider

---
_Source: https://npm.io/package/react-ipfs-provider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
