npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

comment-on-it

v1.1.13

Published

A Serverless Webtask based component for adding user Comments in any ReactJs Web site.

Downloads

24

Readme

comment-on-it

comment-on-it is the answer to every Site developer's need to add 'Comments' functionality without breaking a sweat. It is a ReactJs, Webtask-based Serverless component that can be used as a regular ReactJs component anywhere that Comments are needed on a site.

See it in action here, used in a Photo-based static website:

https://photo-comments.herokuapp.com/

Note: The site may be asleep, patience !


Achitecture:

  • comment-on-it is implemented as a Serverless Component.
  • The User interface is implemented using ReactJs.
  • It uses a Webtask to manage its backend functionality.
  • mLab is a cloud based MongoDB provider, that is used to store the comments from the site.

Usage

import { CommentOnIt } from 'comment-on-it'
:
:

    render() {
        return (
            <div>
                <img src='https://photos/photo1' alt='Photo 1'>
                <CommentOnIt
                    appId='52063950-79bc-4b59-b2a7-f7b4cd2430ca'
                    instanceId='Photo1'
                    header='Join the discussion :' />
            </div>
        );
    };
  • The component takes 3 props:
    • appId: This is unique to your site. Get an AppId by registering your credentials here <TDB>. For now, use your site url as an unique identifier.
    • instanceId: This refers to the context of the Comments. In the example above, the comments are related to 'Photo1'.
    • header: This shows up as the HeaderText on the Comment component.
  • When the component is loaded, it gets the Comments posted for this AppId and InstanceId combination.
  • If any of the props change, the Comments are queried again and refreshed
  • The component remembers the logged in user, and attaches the username to every comment posted.
  • The user can logout to clear the username.

Sneak Preview of Version 2.0.0 (Release date not confirmed yet.)

  • Custom Themes to match your website theme.
  • Integration with Auth0 Lock screen to enable easy and secure SignIn / SignUp.
  • Discussion threads (user replies to other comments).
  • Comment mediation by site admin.