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

hywer

v0.0.31

Published

🥢 World Smallest, JSX based, Fine Grained Reactive UI Library.

Downloads

13

Readme

Logo

🥢 World Smallest, JSX based, Fine Grained Reactive UI Library.

Hywer is a World Smallest1kb, JSX based, Fine Grained Reactive UI Library. Hywer uses native browser apis like createElement, createTextNode and reactively update its content. In Hywer all you JSX components like <Component/> is a native HTMLElement objects. Hywer updates DOM granularly and asynchronously without slowing down your code.

Getting Started

At a glance

import { ref } from "hywer"

const App = () => {
  const count = ref(0)
  const doubleCount = count.derive(val => val * 2)

  return <>
    🧡 {doubleCount}
    <button onClick={() => count.val++}>👍</button>
    <button onClick={() => count.val--}>👎</button>
  </>
}

document.getElementById("app").append(...<App />)

Key Features

  • 1kb bundle size in brotli / gzip.
  • JSX support out of the box.
  • No virtual DOM.
  • Fine grained updates to real DOM.
  • Declarative UI programming with reactive states.
  • Quick to learn. No component lifecycles or other super complicated crap.
  • Don't pay for what you don't use. 0.7kb bundle size without reactive state
  • Debuggable. <div> is a real div in DOM. Use your browser dev tools to inspect rendering.
  • Rerender free mental model.
  • Static reactive dependencies for best performance and async execution.
  • UglifyJS / closure compiler ready code base.
  • Incredibly Small & Understandable code base.
  • Support of existing infrastructure tools like webpack babel vite swc bun, with little configuration.

Links

Why Hywer?

Performant

Carefully optimized for performance and bundle size. Hywer performance indistinguishable from vanilla js. Hywer provides very little layer of abstraction between your code and browser apis. Reactive value dependecies is static and execution is async without main thread blocking.

No Magic

Hywer behavior is predictable and simple to understand without any magic values or runtime dependency tracking.

Unopinionated

Hywer only does one thing and does it well. Hywer does not dictate to you the style of code, where you use it, whether to use jsx, or the build system. You can use Hywer with babel, swc, webpack or what you want. You can even use Hywer with another framework if you want. Hywer is just a lib that generates HTMLElement.

Anything

Hywer can be anything you want it to be, depending on your desires, Hywer is open to your suggestions and pull rеquestions. You are the one who can make Hywer better!

Browser support

Hywer support all mainline browser and any runtime with DOM api like Deno or Node.

More

At this point Hywer is in a very early stage of development so feel free to open an issue with your problems and suggestions.

Todo

  • [ ] write base docs
    • [ ] getting started
    • [ ] api doc
  • [ ] typescript support out of the box
    • [ ] write hywer.d.ts for all exported api
  • [ ] project templates
    • [x] vite template
    • [ ] swc template
    • [ ] webpack template
    • [ ] maybe other...
  • [ ] bundlers plugins
    • [ ] vite plugin
    • [ ] webpack plugin
    • [ ] esbuild plugin (maybe. idk)
  • [ ] website
  • [x] bundle size test
  • [ ] fine grained array change
    • for now arrays simply remove all old elements and insert new
  • [ ] write tests
    • i dont really understand how to write tests for dom content

made with ❤️ by ssleert