-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[Basic] Provide some docs on memo
#719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
memo
Sounds like it could be useful. Feel free to contribute! |
Assign me this issues |
Just create a PR if you want to contribute |
@filiptammergard i just contributed the Memo and Memoization in React with TypeScript. and raised the PR. |
@filiptammergard I've raised the PR, please do check |
I realize that React.memo is not specific to React+TypeScript, so it's better to just look in the official React docs. In this project we only document things that are directly related to how to use TypeScript with React. Thanks for suggestion though! |
What cheatsheet is this about? (if applicable)
Basic cheatsheet
What's your issue or idea?
Some docs on
memo
would be useful.For example it took me a while to understand that such a combination of
memo
andforwardRef
is wrong (the resulting type would not includeref
):The correct way is to omit
<Props>
on memo if there isforwardRef
inside it, so my suggestions are:The text was updated successfully, but these errors were encountered: