34 lines
636 B
Markdown
34 lines
636 B
Markdown
## Installation ∙ [](https://www.npmjs.com/package/reacord)
|
|
|
|
```console
|
|
# bun
|
|
bun add reacord react discord.js
|
|
|
|
```
|
|
|
|
## Example
|
|
|
|
<!-- prettier-ignore -->
|
|
```tsx
|
|
import { useState } from "react"
|
|
import { Embed, Button } from "reacord"
|
|
|
|
function Counter() {
|
|
const [count, setCount] = useState(0)
|
|
|
|
return (
|
|
<>
|
|
<Embed title="Counter">
|
|
This button has been clicked {count} times.
|
|
</Embed>
|
|
<Button
|
|
label="+1"
|
|
onClick={() => setCount(count + 1)}
|
|
/>
|
|
</>
|
|
)
|
|
}
|
|
```
|
|
|
|

|