cerebral / overmind

Overmind - Frictionless state management
https://overmindjs.org
MIT License
1.58k stars 95 forks source link

Out-of-the-box features for remote data #436

Open cassiozen opened 4 years ago

cassiozen commented 4 years ago

Recently, libraries like React Query and React SWR have proposed a new approach to data fetching with tremendous benefits for the developer (mainly Caching & invalidation) as well as some other sophisticated features like:

The problem with those libraries is that they are React hooks, and as a consequence, the data cycle becomes tightly coupled with the components.

I love how overmind comes with powerful tools out-of-the-box (like state machines). Since data fetching ends up being so intertwined with state management, are there any thoughts on bringing an out-of-the-box developer experience regarding data fetching with the features like these?

EQuimper commented 4 years ago

Would be awesome to have something like that. It's kind of like hte GraphQL integration. Really looking to see this coming if possible :)

johnnypea commented 4 years ago

Would be definitely great if we have native support for these.

Found this post https://imfeld.dev/writing/swr_with_xstate a couple of days ago and I plan to enhance my Overmind implementation in the same way.

cassiozen commented 4 years ago

Redux just announced something in this direction: https://rtk-query-docs.netlify.app/

christianalfoni commented 3 years ago

This certainly sounds interesting! I think it has to come from the community cause it would require a ton of research on my end, but I would love to advice and help out if anyone has an idea and just want help to integrate it 😄 Or if there is a more generic library we can use (like we do with graphql)

JonDum commented 7 months ago

It's been a few years now, so I'm curious what everyone interested in this ended up using as a solution.

Overmind is flexible enough that you could implement something similar yourself but it seems very wet when libs userSWR/react-query already have all that logic.