pmndrs/zustand ? reverse-engineered prompt

Reverse engineered prompt

I need a simple state management library for my React projects, something like Zustand. The whole vibe should be 'bear necessities'—small, fast, and unopinionated. The main thing is that it should be super easy to use, letting me create a 'store' with a simple function. Then, in my components, I should be able to use a React hook to pull out just the state I need, and the component should only re-render when that specific piece of data changes.

A huge requirement is that I don't want to wrap my app in a bunch of context providers. It should just work. It should also support async actions for things like fetching data from an API. Please build this out in TypeScript. The goal is something that avoids boilerplate and is more powerful than basic React Context but less complex than setting up Redux.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab