Nagging Mario's Princess

    @wiredcraft/miniprogram-sparrow
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    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");
        },
      },
    });

    Keywords

    none

    Install

    npm i @wiredcraft/miniprogram-sparrow

    DownloadsWeekly Downloads

    199

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    13.3 kB

    Total Files

    12

    Last publish

    Collaborators

    • kusmarius
    • djordjeobradovic
    • jelena10
    • kunlun8809
    • shane777
    • stellar_saber
    • xavier.lai
    • stefan1105
    • loicpirezwc
    • draganmijajilovic
    • nebojsapm
    • freeyetiw
    • raohael_biland
    • liyachun01
    • echoyueyu
    • wiredcraft-bot
    • makara
    • xavierchow
    • drakexiang
    • kaleocheng
    • flyingant
    • ccharlieli
    • rankun203
    • superbogy
    • miffyliye
    • lalawow
    • bsdelf
    • shuaibird
    • juhas
    • xiao_t
    • agreatfool
    • chopperlee2011
    • woodpig07
    • dowla
    • eronekogin
    • kuno
    • xpol
    • wangjianting
    • estemomento