rrousselGit / riverpod

A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
https://riverpod.dev
MIT License
6.28k stars 955 forks source link

Is Riverpod Family Provider the Same as Recoil AtomFamily? #2615

Closed davie1989 closed 1 year ago

davie1989 commented 1 year ago

Describe what scenario you think is uncovered by the existing examples/articles Hello, thanks for creating this amazing library. I am coming from reactjs world and with react, I use recoil for handling global state and in recoil, there is an atomFamily hook.

What is does is that just like riverpod provider, you can declare a state and pass it an id. And based on the id, the state can hold unique data.

So, I can have on atomFamily declaration and I can declare this state anywhere and pass unique id. Then I can put data in the state based on id. And the state will return only data for a given id.

I just want to know if that is the same concept with riverpod family provider. Because I really need that functionality in flutter global statement library.

Thanks.

rrousselGit commented 1 year ago

Yes, they are similar. Hence the name. :)