0.1.3 • Published 12 months ago

jotai-tiny v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

jotai-tiny

Reactjs State Manager with no dependencies

npm version npm npm All Contributors

Demo

Demo

Installation

NPM

Require

react >= 18

To install the latest stable version:

npm install --save jotai-tiny

Basic usage:

import { atom, useAtom, useAtomValue } from "jotai-tiny";

const atomCount = atom(0);
const atomCount1 = atom(1);

// const totalCountAtom = atom((get) => get(atomCount) + get(atomCount1));
// const dataAtom = atom(() => fetch("/data.json").then((res) => res.json()));

const App = () => {
  const [count, setCount] = useAtom(atomCount)

  return <>
    <h5>{count}</h5>
    <button onClick={() => setCount(count + 1)}>Click</button>
  </>;
}
0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago