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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lvindotexe/pico

v0.0.4

Published

This is my tiny react clone i built in order to get a better understanding of Reactjs. its based of https://pomb.us/build-your-own-react/.

Downloads

3

Readme

@lvindotex/pico

This is my tiny react clone i built in order to get a better understanding of Reactjs. its based of https://pomb.us/build-your-own-react/.

Installation

right now the framework only works on vite create a vanilla Javascipt/TypeScript project with vite

pnpm i @lvindotexe/pico @vitejs/plugin-react

create a vite.config.ts

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [
    react({
      jsxRuntime: "classic",
    }),
  ],
});

replace script src in index.html from /src/main.ts to /src/main.tsx

replace main.ts with main.tsx, here is an example of a counter

import { useState, createRoot, useMemo, Pico } from "@lvindotexe/pico";

/** @jsx Pico.createPicoElement */
function Counter() {
  const [state, setState] = useState(1);

  return (
    <div>
      <h1 className="text-2xl font-bold">The count is {state}</h1>
      <button
        className="font-bold"
        onclick={() => setState((prev) => prev + 1)}
      >
        increment
      </button>
    </div>
  );
}

const root = document.getElementById("app")!;
Pico.createRoot(root).render(<Counter />);

run npm run dev and you should be good to go

Hooks

work the same way as react hooks, right now ive only implemented; useState,useEffect,and useMemo. next hooks i plan to support will be useReducer, and useContext.

pico only supports functional components and I've no intention to support class components. props are supported in the same ways as react.

useState

is a reactive primitive that allows users to set variables and objects that change over time. calling the useState function returns a tuple that contains the value of the state, and a setter, to change the state of the value

import { useState } from "@lvindotexe/pico";

function Counter() {
  const [state, setState] = useState(1);
  return (
    <div>
      <h1 className="text-2xl font-bold">
        The sum is {state} and {result}
      </h1>
      <button
        className="font-bold"
        onclick={() => setState((prevState) => prev + 1)}
      >
        increment
      </button>
    </div>
  );
}

useEffect

useEffect allows use to run specific actions when state changes.heres an example of a clock. Remember to cleanup event listeners and timers

import { useEffect } from "@lvindotexe/pico";

function Counter() {
  const [state, setState] = useState(Date.now());

  useEffect(() => {
    let timer = setTimeout(() => setState((prev) => Date.now()), 1000);
    return () => clearTimeout(timer);
  });
  return (
    <div>
      <h1 className="text-2xl font-bold">The time is {state}</h1>
    </div>
  );
}

useMemo

allows you cache the result of a calculation between re-renders. results are only recomputed when dependancies change.

import { useMemo } from "@lvindotexe/pico";

function Counter({
  initial,
  incrementBy,
}: {
  initial: number;
  incrementBy: number;
}) {
  const [state, setState] = useState(initial);
  const result = useMemo(() => state + incrementBy, [state]);

  return (
    <div>
      <h1 className="text-2xl font-bold">
        {state} and {result}
      </h1>
      <button
        className="font-bold"
        onclick={() => setState((prev) => prev + 1)}
      >
        increment
      </button>
    </div>
  );
}

useReducer

Makes it easier to manage complex state logic when the next state is dependant on the previous state.

import { useReducer } from "@lvindotexe/pico";
function reducer(state: number, action: "inc" | "dec") {
  switch (action) {
    case "inc":
      return state + 1;
    case "dec":
      return state - 1;
    default:
      throw "";
  }
}

function Counter() {
  const [state, dispatch] = useReducer(1, reducer);

  return (
    <div>
      <h1 className="text-2xl">The count is {state}</h1>
      <button className="font-bold" onclick={() => dispatch("inc")}>
        increment
      </button>
      <button className="font-bold" onclick={() => dispatch("dec")}>
        decrement
      </button>
    </div>
  );
}

useContext

TODO

  • fix useState triggering twice when called for the first time
  • refractor lib to look less of a didact clone
  • useContext
  • maybe a statemanager like zustand