North Pittsburgh Meatpackers

    @wcd/uppercod.demo-atomico-counter

    0.1.0 • Public • Published

    logo

    CircleCI npm gzip

    Small library for the creation of interfaces based on web-components, only using functions and hooks, if you want to try Atomico and you need help tell me in Twitter Uppercod 🤓.

    Reviewed the example

    The example shows how to create a counter, you can control the status of this using the atomic given hooks, useObserver allows controlling an already defined observable.

    let [count = 0, setCount] = useObservable("value");

    useObservable(observable:string):[value,Function] extracts an observable defined as a static property of the functional WC, egWC.observable = {value: Number}, setCount function is immutable, to maintain the memo optimization strategy.

    If you want to maintain a private state you can use useState or useReducer.

    Keywords

    none

    Install

    npm i @wcd/uppercod.demo-atomico-counter

    DownloadsWeekly Downloads

    3

    Version

    0.1.0

    License

    ISC

    Unpacked Size

    5.36 kB

    Total Files

    8

    Last publish

    Collaborators

    • _divriots_
    • _wcd_
    • georges-gomes
    • gqio
    • gluck