comments-section-react
v1.5.1-stable
Published
React component to render a comments section using commentssection.site
Readme
A React component to render a comments section using commentssection.site. This component allows you to easily embed a comments thread in your React application.
Installation
Install the component via npm:
npm install comments-section-reactOr via Yarn:
yarn add comments-section-reactUsage
To use the CommentsSection component, you need to obtain a threadId from the commentssection.site dashboard. Follow these steps:
- Create a New Thread: Go to the commentssection.site dashboard and create a new thread.
- Get the
threadId: After creating the thread, you will receive athreadIdwhich you will use in the component.
Example
Here is an example of how to use the CommentsSection component in your React application:
import React from 'react';
import CommentsSection from 'comments-section-react';
const THREAD_ID = 'your-thread-id'; // Replace with your actual threadId
const App = () => (
<div>
<h1>Comments Section</h1>
<CommentsSection threadId={THREAD_ID} />
</div>
);
export default App;You can also try a live example on CodeSandbox.
This sandbox also demonstrates how to override the component's styles via custom CSS.
Props
threadId(string): The ID of the thread. This ID is provided to you in the dashboard under the thread's section.
License
This project is licensed under the ISC License.
Support
For any questions or support, please contact [email protected]. Opening a GitHub issue is also welcome. For more detailed information, you can refer to the documentation.
