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

@beaker73/live-update

v0.1.0

Published

Xrm LiveUpdate tries to simplify 'scripting' for DataVerse Model Driven apps by eliminating all the plumping (getting attributes, attaching and removing event handlers, hiding or showing fields) so we are mostly left with only business logic.

Downloads

4

Readme

Xrm LiveUpdate

Xrm LiveUpdate tries to simplify 'scripting' for DataVerse Model Driven apps by eliminating all the plumping (getting attributes, attaching and removing event handlers, hiding or showing fields) so we are mostly left with only business logic.

It was inspired by react, implementing the business logic as render functions and by home assistant templates and how de detect dependencies on states.

Internal Implementation Abstractions

Memory

The root level abstraction is called memory. During every render you can tell it to 'remember' something. As long as you remember or recall this item on every render it is not forgotten. But as soon as you do not activly recall something it will be forgotten at the end of the render fase. You can provided a callback to be called during forgetting, but not block the forgetting.

Memory is per render function, thus multiple render functions cannot influence each other.

Normally you would not directly use the remember/recall functions yourself, but use the hooks that use this abstraction to be implemented.

useEffect

The first abstraction that is generally used by developers is useEffect. Most other abstractions are based on this one.

useEffect activily remembers the setup and cleanup functions as long as it is called. On first call it executes the provided setup function. On next renders it recognizes the key and does not call the setup again. Until useEffect is not called anymore during a render, and thus it will be forgotten. The forget callback will ensure the cleanup is then called.

This effectly ensure that setup is only called once as long as useCallback is called during every render. And cleanup is called exactly once just after useCallback was not called anymore during render.

useId

use Id returns an id that should be unique, but still returns that same id on every render call.

It works by hasing the stack trace from the start of the render function. Effectivly generate a unique id that is always the same for the same line, but different when you call this method again a second time from a different location.

This Id is often used as a unique memory key by other hooks.

warning: The implementation is dependend on the stacktrace generated by the beaker73/async-context package. But then again, this whole library effectivly is.