Skip to content

Commit 71eb8c5

Browse files
authored
Update README.md
1 parent 0c62e1d commit 71eb8c5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77

88
## Usage
99

10-
TBD
10+
This lets you avoid a deeply nested set of providers by defining them as an array.
11+
12+
```javascript
13+
import ProviderStack from 'react-provider-stack';
14+
15+
function App() {
16+
return (
17+
<ProviderStack providers={[Provider1, Provider2, Provider3]}>
18+
<AppLogic />
19+
</ProviderStack
20+
);
21+
}
22+
```
23+
24+
The only requirement is that each provider is a react component that only takes `children`.
1125

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

0 commit comments

Comments
 (0)