facebookexperimental/Recoil

[docs] Finish performance.md

Open

#190 opened on May 28, 2020

View on GitHub
 (9 comments) (0 reactions) (1 assignee)JavaScript (19,428 stars) (1,151 forks)batch import
documentationhelp wanted

Description

Need to finish this docs page and then add it to docusaurus sidebar. It’s critical for newcomers. Took me several hours to understand this, which tbh I’m not 100% on still.

rough outline

  • use atomFamily for each updatable key of todo, making use of separate components and react.memo to push state down to leaf nodes
  • bonus: show what would be required if there was an initial list of todos (as if it were fetched from an api).
    • show how to use selectorFamily to select default value, may require keeping an initialState atom?
    • show how to write a selector to roll back together todos into a list in using todoIdsState.map(id => ...) and getting each part back out atomFamily

Contributor guide