facebookexperimental/Recoil

[docs] Finish performance.md

Open

#190 创建于 2020年5月28日

在 GitHub 查看
 (9 评论) (0 反应) (1 负责人)JavaScript (19,428 star) (1,151 fork)batch import
documentationhelp wanted

描述

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

贡献者指南

[docs] Finish performance.md · facebookexperimental/Recoil#190 | Good First Issue