@dhmk/cell-react
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@dhmk/cell-react

React integration for @dhmk/cell

import { cell } from "@dhmk/cell";
import { useCells } from "@dhmk/cell-react";

const counter = cell(1);

const App = () => {
  useCells(counter);

  return (
    <div>
      <h1>{counter()}</h1>
      <button onClick={() => counter.set(counter() + 1)}>click</button>
    </div>
  );
};

/@dhmk/cell-react/

    Package Sidebar

    Install

    npm i @dhmk/cell-react

    Weekly Downloads

    2

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    4.45 kB

    Total Files

    10

    Last publish

    Collaborators

    • dhmk083