{"id":22982857,"url":"https://github.com/neomaxzero/usedisqus","last_synced_at":"2026-02-23T03:42:30.212Z","repository":{"id":119683934,"uuid":"223725571","full_name":"neomaxzero/useDisqus","owner":"neomaxzero","description":"React hook recipe to import comments from disqus","archived":false,"fork":false,"pushed_at":"2019-11-24T10:42:01.000Z","size":3,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T01:27:51.478Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neomaxzero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-24T10:19:14.000Z","updated_at":"2021-05-23T17:50:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"51e3bc35-abc1-45f1-a3e2-bd93136a38b4","html_url":"https://github.com/neomaxzero/useDisqus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomaxzero%2FuseDisqus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomaxzero%2FuseDisqus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomaxzero%2FuseDisqus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomaxzero%2FuseDisqus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neomaxzero","download_url":"https://codeload.github.com/neomaxzero/useDisqus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246794206,"owners_count":20834938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T02:33:22.418Z","updated_at":"2025-10-25T03:03:09.773Z","avatar_url":"https://github.com/neomaxzero.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# useDisqus\nReact hook recipe to import comments from disqus\n\n## Steps\n1. Copy this snippet.\n2. Use it in your project.\n\n## Recipe\n\n```javascript\n// Comments.js\nimport React, { useEffect } from 'react'\n\nconst Comments = ({ fullUrl, id }) =\u003e {\n  useEffect(() =\u003e {\n    const DISQUS_SCRIPT = 'disq_script'\n    const sd = document.getElementById(DISQUS_SCRIPT)\n    if (!sd) {\n      var disqus_config = function() {\n        this.page.url = fullUrl\n        this.page.identifier = id\n      }\n\n      const d = document\n      const s = d.createElement('script')\n      s.src = 'https://m4x-io.disqus.com/embed.js'\n      s.id = DISQUS_SCRIPT\n      s.async = true\n      s.setAttribute('data-timestamp', +new Date())\n\n      d.body.appendChild(s)\n    } else {\n      window.DISQUS.reset({\n        reload: true,\n        config: disqus_config,\n      })\n    }\n  }, [])\n  return \u003cdiv id=\"disqus_thread\"\u003e\u003c/div\u003e\n}\n\nexport default Comments\n```\n\n\n## Use\n\n```javascript\n// Post.js\nimport React from 'react';\nimport Comments from './Comments';\n\nconst Post = () =\u003e (\n\u003c\u003e  \n  \u003cRestOfThePost /\u003e\n  \u003cComments /\u003e\n\u003c/\u003e\n);\n\nexport default Post;\n\n```\n## Future (if someone give me a star)\n\n- Create real hook to import. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneomaxzero%2Fusedisqus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneomaxzero%2Fusedisqus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneomaxzero%2Fusedisqus/lists"}