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

reactivator

v0.5.0

Published

A framework-independent package to transform data elements into reactive ones.

Downloads

28

Readme

reactivator reactivator

A framework-independent package to transform data elements into reactive ones.

This project is a very small library package that provides simple yet rich reactivity to arbitrary data elements. It has no runtime dependencies. It is platform agnostic, however it is not intended for use in combination with other frameworks which may implement the same functionality, or have naming clashes.

Reactivator Wiki and API Documentation

For more information, see the Reactivator Wiki for more.

In particular, several functions are available in the Reactivator API for JavaScript. See the API page for more.

See also the example page for a source code example, as well as the resulting output.

WORK IN PROGRESS

This is an early work-in-progress, not intended for any serious purpose at this time. Furthermore, it is a 0.x release, meaning it is likely to have breaking changes as the interface is worked out in practice, and becomes more complete.

ROADMAP - FUTURE UPDATES

With the inclusion of isDirty in 0.5.0, there are no known issues or missing roadmap features. Updates will continue as issues are found and resolved, or as new features become evident.

INSPIRATION

This project has been an attempt at learning how reactivity other frameworks works behind the scenes, especially in Vue, by implementing major features of it from scratch. It is therefore both inspired by Vue.js, and in many ways, is modeled after Vue. It incorporates a small portion of the Composition API features in Vue 3, although is a much simpler implementation with fewer features and less maturity.

Note that in spite of the inspiration, there are some significant differences in this code. It is not intended to be compatible with the Vue API (why bother replicating Vue reactivity exactly?) and has some significant differences that may make it easier to use. The use of JavaScript Proxy methods on the reactive data elements themselves rather than their members allow for much simpler implementations than even Vue 3 (e.g. no tracking), but this is a learning process and there are probably many good reasons for that in Vue 3 (e.g. perhaps the Vue compiler's hints provided for runtime optimizations). However, in spite of this, the lighter design and implementation may be appropriate for some hobby projects.

LIVEKIT

This project is really a subproject of the LiveKit project, which is a very light JavaScript framework. In fact it is so light that it requires no bundling, not even web hosting to serve the file: you can double-click a .html file to use it, even in production. The Reactivator project is just the reactive data provider for LiveKit. It may be useful on its own and is available now so it has been provided separately.

Both of these were just personal projects, originally started in order to gain a deeper understanding of how these kinds of packages and frameworks actually worked. But a secondary goal was to achieve something useful to my own hobby projects that were so light that major frameworks were overkill. And to kiss goodbye the complexities of webkit, etc.

Use of separate external component files in LiveKit, including single-file components (SFCs), require at least web hosting due to CORS concerns (and file access from browsers). However, something as simple as the http-server package or equivalent (or a simple Express or Fastify server with static file support) can be used to serve LiveKit apps.

I have also experimented with very basic, generic use of Rollup as an optional delivery mechanism in order to gain automatic tree-shaking, simplify CJS/ESM module and numerous other benefits and optimizations. Rollup is used to produce the dist folders for both Reactivator and LiveKit.

Note that LiveKit is not yet available which is why this project describes it in this detail.