react >= 18
npm install --save jotai-tiny
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>
</>;
}