react-utterances

0.6.4 • Public • Published

react-utterances

react-utterances is the react component for utterances that is a lightweight comments widget built on GitHub issues. To get started, checkout https://utteranc.es

Check out below:

install

$ yarn add react-utterances

usage

utterances have 6 types of Blog Post<->Issue Mapping currently. react-utterances support all 6 types, check out below examples.

  1. pathname type:
import React, { Component } from 'react'
import ReactUtterences from 'react-utterances'
 
const repo = 'github-namespace/project-name'
 
class MyComponent extends Component {
  render() {
    return (
      <div>
        <h1>What is Lorem Ipsum?</h1>
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
        <ReactUtterences repo={repo} type={'pathname'} />
      </div>
    )
  }
}
 
export default MyComponent
  1. url type. just change pathname to url in above example:
-        <ReactUtterences repo={repo} type={'pathname'} />
+        <ReactUtterences repo={repo} type={'url'} />
  1. // TODO

Package Sidebar

Install

npm i react-utterances

Homepage

http:

Weekly Downloads

8

Version

0.6.4

License

MIT

Unpacked Size

10.8 kB

Total Files

7

Last publish

Collaborators

  • b6pzeusbc54tvhw5jgpyw8pwz2x6gs