Confusing example in documentation #2395
Unanswered
imMatheus
asked this question in
Bug report
Replies: 2 comments 5 replies
-
Can you please open a PR to improve docs? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Or, feel free to ask questions here before working on it. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
In the perfomance section of the docs, at the end there is a code example that seems to be outdated. If you look at the code for the
Item
component, in the use useMemo its referring to aval
variable in theuseAtom(atom(val))
part. But this variable does not exist in the rest of the code. Im guessing that it should beinitialValue
. Also its pretty weird that theItem
code hasReact.useMemo
but theList
just usesuseMemo
, In my opinion this can be confusing as to why there is a difference.Link to reproduction
https://jotai.org/docs/guides/performance
Check List
Please do not ask questions in issues.
Please include a minimal reproduction.
Beta Was this translation helpful? Give feedback.
All reactions