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.59k stars 1.19k forks source link

Provided examples of atom and selector recoil tutorials, plus new dispatcher tutorial #375

Open GeoffCox opened 4 years ago

GeoffCox commented 4 years ago

The tutorials for atoms and selectors are great. I wanted to be able to run them, so I built the tutorials as full working examples. I took a little liberty and updated the code to use Typescript.

I had previously built a dispatcher as part of a recoil app (and tweeted about it), so I added a tutorial and example on how to build a dispatcher. It extends the ToDo application with a recycle bin and log.

Check them out here: https://github.com/GeoffCox/recoil-examples

If you wanted to create a repository under facebookexperimental containing any/all of these examples let me know. I'm happy to remove my repo in favor of an official one. Also, let me know what you think of the dispatcher pattern.

Shmew commented 4 years ago

I've got a bunch of examples and abstractions built on-top of recoil here, but it's in F# so not exactly straight forward for those not familiar with the language.