facebookexperimental/Recoil

[docs] Finish performance.md

オープン

#190 opened on 2020/05/28

 (9 件のコメント) (0 件のリアクション) (1 人の担当者)JavaScript (1,151 件のフォーク)batch import
documentationhelp wanted

Repository metrics

Stars
 (19,428 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド