Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
notwillk authored Apr 19, 2023
1 parent 0c62e1d commit 71eb8c5
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@

## Usage

TBD
This lets you avoid a deeply nested set of providers by defining them as an array.

```javascript
import ProviderStack from 'react-provider-stack';

function App() {
return (
<ProviderStack providers={[Provider1, Provider2, Provider3]}>
<AppLogic />
</ProviderStack
);
}
```

The only requirement is that each provider is a react component that only takes `children`.

This README was generated by [anansi](https://github.com/ntucker/anansi/tree/master/packages/generator-js#readme).

0 comments on commit 71eb8c5

Please sign in to comment.