Recreating Facebook’s Recoil library

This weekend I decided to play with the new kid on the block – Facebook’s Recoil library for managing state. I did the trivial counter example to see how it works. It’s pretty simple idea so I wondered how much it takes to replicate its features. I found the exact answer – 70 lines of code. Obviously, my implementation didn’t cover everything but it was fun so I decided to share my findings.

(A side note: I did not look at the code of Recoil. I didn’t want to be bias on how to write my version.)

This weekend I decided to play with the new kid on the block – Facebook's Recoil library for managing state. I did the trivial counter example to see how it works. It's pretty simple idea so I wondered how much it takes to replicate its features. I found the exact answer – 70 lines of code. Obviously, my implementation didn't cover everything but it was fun so I decided to share my findings.

(A side note: I did not look at the code of Recoil. I didn't want to be bias on how to write my version.)


Print Share Comment Cite Upload Translate
APA
Krasimir Tsonev - blog | Sciencx (2024-03-28T18:06:59+00:00) » Recreating Facebook’s Recoil library. Retrieved from https://www.scien.cx/2021/02/07/recreating-facebooks-recoil-library/.
MLA
" » Recreating Facebook’s Recoil library." Krasimir Tsonev - blog | Sciencx - Sunday February 7, 2021, https://www.scien.cx/2021/02/07/recreating-facebooks-recoil-library/
HARVARD
Krasimir Tsonev - blog | Sciencx Sunday February 7, 2021 » Recreating Facebook’s Recoil library., viewed 2024-03-28T18:06:59+00:00,<https://www.scien.cx/2021/02/07/recreating-facebooks-recoil-library/>
VANCOUVER
Krasimir Tsonev - blog | Sciencx - » Recreating Facebook’s Recoil library. [Internet]. [Accessed 2024-03-28T18:06:59+00:00]. Available from: https://www.scien.cx/2021/02/07/recreating-facebooks-recoil-library/
CHICAGO
" » Recreating Facebook’s Recoil library." Krasimir Tsonev - blog | Sciencx - Accessed 2024-03-28T18:06:59+00:00. https://www.scien.cx/2021/02/07/recreating-facebooks-recoil-library/
IEEE
" » Recreating Facebook’s Recoil library." Krasimir Tsonev - blog | Sciencx [Online]. Available: https://www.scien.cx/2021/02/07/recreating-facebooks-recoil-library/. [Accessed: 2024-03-28T18:06:59+00:00]
rf:citation
» Recreating Facebook’s Recoil library | Krasimir Tsonev - blog | Sciencx | https://www.scien.cx/2021/02/07/recreating-facebooks-recoil-library/ | 2024-03-28T18:06:59+00:00
https://github.com/addpipe/simple-recorderjs-demo