mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-14 21:10:38 +01:00
add documentation block to readme
This commit is contained in:
parent
0f9e6f927d
commit
f4b6a191f8
15
README.md
15
README.md
@ -25,6 +25,7 @@
|
|||||||
- [🏄 Quick Start](#-quick-start)
|
- [🏄 Quick Start](#-quick-start)
|
||||||
- [1. Add Provider](#1-add-provider)
|
- [1. Add Provider](#1-add-provider)
|
||||||
- [2. Use Hooks](#2-use-hooks)
|
- [2. Use Hooks](#2-use-hooks)
|
||||||
|
- [📖 Documentation](#-documentation)
|
||||||
- [🦑 Development](#-development)
|
- [🦑 Development](#-development)
|
||||||
- [✨ Code Style](#-code-style)
|
- [✨ Code Style](#-code-style)
|
||||||
- [👩🔬 Testing](#-testing)
|
- [👩🔬 Testing](#-testing)
|
||||||
@ -64,7 +65,7 @@ export default function MyComponent() {
|
|||||||
const { ocean, web3, account } = useOcean()
|
const { ocean, web3, account } = useOcean()
|
||||||
|
|
||||||
// Get metadata for this asset
|
// Get metadata for this asset
|
||||||
const { title, metadata, bestPrice } = useMetadata(did)
|
const { title, metadata, price } = useMetadata(did)
|
||||||
const [price, setPrice] = useState<string>()
|
const [price, setPrice] = useState<string>()
|
||||||
|
|
||||||
// publish asset
|
// publish asset
|
||||||
@ -80,7 +81,7 @@ export default function MyComponent() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>{title}</h1>
|
<h1>{title}</h1>
|
||||||
<p>Price: {bestPrice}</p>
|
<p>Price: {price}</p>
|
||||||
|
|
||||||
<p>Your account: {account}</p>
|
<p>Your account: {account}</p>
|
||||||
<button onClick={handleDownload}>
|
<button onClick={handleDownload}>
|
||||||
@ -91,6 +92,16 @@ export default function MyComponent() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 📖 Documentation
|
||||||
|
|
||||||
|
- [useOcean/OceanProvider](src/providers/OceanProvider/)
|
||||||
|
- [usePublish](src/hooks/usePublish/)
|
||||||
|
- [useMetadata](src/hooks/useMetadata/)
|
||||||
|
- [useConsume](src/hooks/useConsume/)
|
||||||
|
- [useCompute](src/hooks/useCompute/)
|
||||||
|
|
||||||
|
There is also an example app based on Create React App under [`example/`](example/).
|
||||||
|
|
||||||
## 🦑 Development
|
## 🦑 Development
|
||||||
|
|
||||||
The project is authored with TypeScript and compiled with `tsc`.
|
The project is authored with TypeScript and compiled with `tsc`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user