rd

react-discord

A react reconciler to render react components on Discord

Showing:

Popularity

Downloads/wk

1

GitHub Stars

1

Maintenance

Last Commit

3mos ago

Contributors

1

Package

Dependencies

3

Size (min+gzip)

26.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Readme

React-Discord

Introduction

React-discord is a small react-reconciler to use with Discord.js to make bot flows using text messages.

This library only provides only 2 host components:

  • Embed
  • Text

Both components make use of reactions to enable interactivity.

Example

import Discord from "discord.js";
import React from "react";
import ReactDiscord, { DiscordS, Embed, RootContainer } from "react-discord";

function MyComponent(props) {
  return <Embed title={props.text} description="Lorem ipsum dolor sit amet" />;
}

const rootContainer = new RootContainer(
  YOUR_DISCORD_CLIENT,
  textChannel, // <- You need to provide a text channel from the discord.js library
);

ReactDiscord.render(<MyComponent text="Hello World!" />, rootContainer);

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100