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

react-tiny-mvvm

v0.0.5

Published

A light mvvm framework for react development.

Readme

React Tiny Mvvm

Introduce

React Tiny Mvvm is a light mvvm framework for React/React-Native.

React Tine Mvvm has future s as follow:

  • Message is used to connect different components. You can simply use send/register pattern to complete the communication between two components.
  • Peal the bussiness logic off the View (in tranditional react) and provide View/ViewModel for developing in Mvvm pattern.
  • Observable Object and Array.
  • Unify the usage for Sync / Async operation.
  • So on...

Usage

  • For npm: npm install react-tiny-mvvm --save
  • For yarn: yarn add react-tiny

Create a ViewModel with Observable Properties

// MyViewModel.viewmodel.ts

import { ViewModelBase, NotifyProperty } from 'react-tiny-mvvm';

export class MyViewModel extends ViewModel {
  constructor() {
    super()
  }
  
  // Observable Property
  private _propName: any = ...
  @NotifyProperty()
  get propName(): any { return this._propName; }
  set propName(value: any) { this._propName = value; }
  
  // Event handler
  onClick() {
    this.propName = ...;
  }
}

Connect ViewModel to View:

// MyView.view.ts
import * as React from 'react';
import { ViewBase, ConnectVVM } from 'react-tiny-mvvm';
import { MyViewModel } from './MyViewModel.viewmodel';

// Connect the viewmodel to its view.
@ConnectVVM(MyViewModel)
export class MyView extends ViewBase<MyViewModel> {
  constructor(props: {}, contex: {}) {
    super(props, contex);
  }
  
  render() {
    const vm = this.viewmodel;
    
    return (
      <div onClick={ () => vm.onClick() }>{vm.propName}</div>
    );
  }
}

Register / Send a message

// Place where you want to send message to all listening to it.
Messenger.Default.send(DefaultToken.create('todoSometing'), 'a message');

// Place where you want to accept message.
Messenger.Default.register(DefaultToken.create('todoSomething'), (msg: string) => {
  console.log(msg); // parameter of msg will be 'a message'
});

Create a Observable Array Property

import { ObservableArray } from 'react-tiny-mvvm';

private _array: ObservableArray<any> = new ObservableArray();
@NotifyProperty({isObservableArrayProperty: true})
get array(): ObservableArray<any> { return this._array; }
set array(value: ObservableArray<any>) { this._array = value; }

// To modify array then notify the change.
this.array.modifyArray(array => array.push(1));

Run Demo

cd demo
cd todo-list
yarn install
yarn start

Route Map

  • Observable object
  • Async operation optimizing
  • ...

Distribute

Under construction

Contact

Take issue directly please if you have any question or suggestion.