pmndrs/jotai ? reverse-engineered prompt
Reverse engineered prompt
Build me a small React state management library that feels simple like useState at first, but can also handle bigger apps without getting messy.
I want the core idea to be atoms, where each atom holds a piece of state, and components can read and update it with a hook. Please support derived values too, so one atom can be computed from others, plus writable atoms for custom updates. It should also handle async reads and async actions in a clean way, so I can fetch data and show loading states naturally.
Make it TypeScript friendly, keep the core tiny, and include a few useful helpers and examples so people can actually learn it fast. Add a basic docs site or demo pages that explain how to use primitive atoms, derived atoms, and async atoms. If you need to look up current docs or React details online, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit