facebookexperimental / Recoil

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
https://recoiljs.org/
MIT License
19.62k stars 1.19k forks source link

"Selector" is a confusing term - I propose to call it "Molecule" #226

Open sveta-slepner opened 4 years ago

sveta-slepner commented 4 years ago

Since in Recoil selectors can optionally set other atoms values, I think a more fitting name for them would be molecule- it's constructed of other atoms values, and can update them as well!

It took me a minute or two to wrap my head around when reading the doc - why a selector can change state parts? And it's because it's just not the same as let's say "reselect" in Redux or "@computed" in MobX. It's more complex.

AjaxSolutions commented 4 years ago

Call it derivation or computed since this is derived state.

dharkness commented 4 years ago

If you're going to stick with the chemistry theme and aren't worried about people constantly misspelling the word, might I suggest catalyst? While selectors don't speed up the process of combining atoms as catalysts do, they are involved in the reaction of combining other atoms and aren't consumed in that reaction.

philohelp commented 4 years ago

(from electronics) : "combiners" ?

verekia commented 4 years ago

Call it derivation or computed since this is derived state.

Derivation being a noun, I think it works better.

timini commented 4 years ago

molecule is not confusing at all, perfectly clear what that does

junhyuk-prestolabs commented 3 years ago

Yes, selector and family is really confusing term.

timini commented 3 years ago

🤮