DEV Community

Discussion on: Recoil - an experimental state management library for React apps open-sourced by Facebook

Collapse
 
alirezatk73 profile image
Alireza

So this is Context API without so much context. you would need a bit of boilerplate code to set it up properly refer to Kent c Dodds article =>
kentcdodds.com/blog/how-to-use-rea....

Effectively and not to mention the complex Redux. And it has built-in async, which is a plus and prevents unnecessary re-renders of reducers and components and takes it to the next level; however, I hope we can see this idea going through and see what comes up, but I find the selectors a bit confusing. like how we can return a new state in a selector which is dependant on a state in another atom without mutating the initial state

Collapse
 
ralexand56 profile image
ralexand56

You can use selectorFamily to pass parameters into your selector get function.

Collapse
 
wobsoriano profile image
Robert

I think selectors is kinda like computed properties in Vue, what do you think?

Collapse
 
alirezatk73 profile image
Alireza • Edited

exactly. It initiates after an atom state is changed and you can do anything with it or can we? like doing an API call?