Socket
Socket
Sign inDemoInstall

@wiredcraft/miniprogram-sparrow

Package Overview
Dependencies
Maintainers
27
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wiredcraft/miniprogram-sparrow

Experimental Recoil inspired state management


Version published
Weekly downloads
0
decreased by-100%
Maintainers
27
Weekly downloads
 
Created
Source

Install

yarn add @wiredcraft/miniprogram-sparrow

Usage

// store/name.js

import { atom } from "sparrow";

export const firstName = atom("Jack");

// the action
export function updateFirstName(name) {
  write(firstName, name);
}
// components/hello.js
import { write, behavior as sparrow } from "sparrow";
import { firstName, updateFirstName } from "./store/name";

Component({
  atoms: { firstName },

  behaviors: [sparrow],
  lifetimes: {
    attached() {
      console.log(this.firstName);
    },
  },
  methods: {
    handleButtonOnTap() {
      updateFirstName("Rose");
    },
  },
});

FAQs

Package last updated on 09 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc