Skip to main content

ReactJs

Add SlickComment to your project's dependencies

npm install @slickcomment/slickcomment-react

or

yarn add @slickcomment/slickcomment-react

Usage#

import {  WidgetDiscussion,  WidgetSiteComments,  WidgetUserComments,  WidgetModeration,  CommentCount} from '@slickcomment/slickcomment-react';
function App() {    return (        <div>            <WidgetDiscussion              config={{                siteId: 'REPLACE WITH YOUR VALUE',                pageId: 'REPLACE WITH YOUR VALUE',                pageUrl: 'REPLACE WITH YOUR VALUE',              }}            />
            <WidgetUserComments              config={{                siteId: 'REPLACE WITH YOUR VALUE',                targetUserSsoId: 'REPLACE WITH YOUR VALUE',              }}            />
            <WidgetSiteComments              config={{                siteId: 'REPLACE WITH YOUR VALUE',              }}            />
            <WidgetModeration              config={{                siteId: 'REPLACE WITH YOUR VALUE',                getUserSsoToken: () => {                    // @TODO implement this                }              }}            />                      <CommentCount              config={{                siteId: 'REPLACE WITH YOUR VALUE',                pageId: 'REPLACE WITH YOUR VALUE',                translations: {                  zero: '0 comment',                  one: '1 comment',                  many: '{{count}} comments'                },              }}            />        </div>            );}

Comments