Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

utterances reactjs

import React, {Component} from "react";

export default class Comments extends Component {

  componentDidMount () {
      let script = document.createElement("script");
      let anchor = document.getElementById("inject-comments-for-uterances");
      script.setAttribute("src", "https://utteranc.es/client.js");
      script.setAttribute("crossorigin","anonymous");
      script.setAttribute("async", true);
      script.setAttribute("repo", "[ENTER REPO HERE]");
      script.setAttribute("issue-term", "pathname");
      script.setAttribute( "theme", "github-light");
      anchor.appendChild(script);
  }

  render() {
    return (
        <div id="inject-comments-for-uterances"></div>
    );
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: upload image in react next js authentication 
Javascript :: disabling first item in dropdownlist 
Javascript :: leaftjs 
Javascript :: write a program to print patter usign recursion in javascript 
Javascript :: typeorm caching queries time limit globally 
Javascript :: get size of json array online 
Javascript :: sails commands 
Javascript :: get output dir from webpack options 
Javascript :: promtail +verbose 
Javascript :: csvString to json 
Javascript :: Arrow functions by Codeacademy 
Javascript :: dynamically create html table in javascript 
Javascript :: Mapping page number to index 
Javascript :: default parameters in es6 
Javascript :: where is the waypoint json file lunar client mac 
Javascript :: Log Time from Date 
Javascript :: is enabled 
Javascript :: react native helper packages 
Javascript :: how is react different from normal js 
Javascript :: sempole reguler expretion 
Javascript :: rendering component in route with properties 
Javascript :: Javacript code that delays, based on Milliseconds 
Javascript :: splinter wait for input 
Javascript :: void 0 js 
Javascript :: makestyle server side rendering 
Javascript :: javascript to prevent method POST from realoading 
Javascript :: string in vue.js 
Javascript :: search fullname in angular 
Javascript :: ProMrRadel2 
Javascript :: @testing-library/react-native switch 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =