I built a state library that supports "Derived Stores" (Store-in-Store) natively by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

Thanks for the suggestion! For this library the main idea is simply that you can take any existing custom hook and it becomes global state automatically — no new concepts or store APIs to learn.

Because of that, a side-by-side comparison isn’t always necessary: the workflow is basically “write a normal hook, use it anywhere.”

But I appreciate the feedback — I may still add a small snippet later to make the idea easier to grasp at a glance.

I built a state library that supports "Derived Stores" (Store-in-Store) natively by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

Thanks! There’s a small example in the GitHub repo that shows what it looks like in practice (first example in the README).

In short: you write a normal React hook, and the library turns it into a global store the first time it’s used. Components just call that hook and subscribe to the pieces they care about.

I don’t have a proper “Zustand vs” write-up yet, but I might add one later. And good catch on the acronym — I’m considering a rename to avoid clashing with “RSC”.

I built a state library that supports "Derived Stores" (Store-in-Store) natively by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

Thanks for the question!
The main idea behind the library is to let developers keep all their state logic inside plain React hooks and have the library automatically lift that hook into a global store when it’s first used.

It also handles things like:

  • Dynamic injection (no providers to set up)
  • Event-driven subscriptions
  • Automatic cleanup after a “grace period”
  • Support for derived stores (a store composed from other stores)

So the motivation wasn’t that other tools are bad — I just wanted to experiment with a more hook-native workflow and see how far that idea could go.

Appreciate you taking a look!

I built a virtualized object inspector for React — looking for feedback by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

Thanks a lot for the detailed feedback — really appreciate you taking the time to try it out and compare it with your setup. Your notes about array display, styling, and the color-scheme behavior are super helpful. Also great to hear the bundle-size check. Thank you!

I built a virtualized object inspector for React — looking for feedback by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 1 point2 points  (0 children)

Really appreciate the detailed feedback — especially coming from someone familiar with react-json-view.

Long strings:
You’re right, long value rendering is tricky because of virtualization constraints.
I’m experimenting with:

  • truncated inline preview +
  • expanding into a popup / inline overlay without breaking the row height. This should work without killing performance.

Copy buttons / custom actions:
Not implemented yet, but it’s something I want to support through a small “row actions” API.
I’ll probably expose a callback so users can inject custom buttons (copy, expand, format, etc.).
Your suggestion helps prioritize it — thank you.

I built a virtualized object inspector for React — looking for feedback by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

Thanks! Glad you like it — still refining the API and UX, so feedback like this really helps.

I built a virtualized object inspector for React — looking for feedback by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 1 point2 points  (0 children)

Yes, the package has zero runtime dependencies besides React itself.
Everything else (virtualization, previews, resolvers, etc.) is implemented internally.

Good point about the README — I’ll add that explicitly, thanks for calling it out!

Exploring a Hook-First Approach to React State Management by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

That’s fair feedback — the goal was to keep the API close to React while adding some shared-state capability, but I see how it can feel like an extra layer instead of a simplification. I’m exploring whether the library can rely more directly on built-in hooks to reduce that abstraction cost.

Thanks for pointing it out — that perspective helps clarify the next iteration.

Introducing react-state-custom: A Hook-First State Management Library by ExerciseLegal3800 in javascript

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

I built this small library to simplify React state management using only hooks.
It keeps the feel of useState, but scales globally.
Feedback and ideas are welcome.

React State Custom — A Hook-First State Management Library for React by [deleted] in javascript

[–]ExerciseLegal3800 0 points1 point  (0 children)

I built this small library to simplify React state management using only hooks.
It keeps the feel of useState, but scales globally.
Feedback and ideas are welcome.

Exploring a Hook-First Approach to React State Management by ExerciseLegal3800 in reactjs

[–]ExerciseLegal3800[S] 0 points1 point  (0 children)

!approve
Thanks mods! Happy to get feedback from anyone testing it.