react-disqus-components
Version:
react-disqus-components wrapper for official disqus web api
52 lines (39 loc) • 1.44 kB
Markdown
//img.shields.io/npm/v/react-disqus-components.svg)](https://www.npmjs.com/package/react-disqus-components)
[](https://github.com/aquariuslt/react-disqus-components)
[](https://codecov.io/gh/aquariuslt/react-disqus-components)
[](https://github.com/semantic-release/semantic-release)
React Functional Component with `disqus` webapi integration.
> Only support React Functional Component
See `DisqusCommentProps`
```typescript
export interface DisqusCommentProps {
title: string;
identifier: string;
url: string;
shortname: string;
}
```
```typescript jsx
import * as React from 'react';
import { Comment } from 'react-disqus-components';
export const MyComponent = () => {
const pageTitle = 'My Page Title';
const disqusConfig = {
identifier: '', // your page uniq id
url: '', // uslug url
shortname: '' // disqus shortname
};
return (
<Comment
title={pageTitle}
identifier={disqusConfig.identifier}
url={disqusConfig.url}
shortname={disqusConfig.shortname}
/>
);
};
```
[![NPM](https: