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.
Install the component via npm:
npm install comments-section-reactOr via Yarn:
yarn add comments-section-reactTo 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.
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.
threadId(string): The ID of the thread. This ID is provided to you in the dashboard under the thread's section.
This project is licensed under the ISC License.
For any questions or support, please contact support@commentssection.site. Opening a GitHub issue is also welcome. For more detailed information, you can refer to the documentation.