Use React.memo() wisely [link]

A useful focused post on React’s memo function. Since moving away from classes (and forcing?) to use pure components with hooks, methods like shouldComponentUpdate can be a bit of a black box.
This post reminds me that all components are re-rendered (in memory at least) unless memo is used, and some of the pros and cons and use cases (and when you don’t want to use it).
Frankly, doing “modern web dev” is a bit of minefield of these things…
Source: dmitripavlutin.com


This content originally appeared on remy sharp's b:log and was authored by remy sharp's b:log

A useful focused post on React's memo function. Since moving away from classes (and forcing?) to use pure components with hooks, methods like shouldComponentUpdate can be a bit of a black box.

This post reminds me that all components are re-rendered (in memory at least) unless memo is used, and some of the pros and cons and use cases (and when you don't want to use it).

Frankly, doing "modern web dev" is a bit of minefield of these things...

Source: dmitripavlutin.com

Originally published on Remy Sharp's b:log


This content originally appeared on remy sharp's b:log and was authored by remy sharp's b:log


Print Share Comment Cite Upload Translate Updates
APA

remy sharp's b:log | Sciencx (2020-10-06T09:41:08+00:00) Use React.memo() wisely [link]. Retrieved from https://www.scien.cx/2020/10/06/use-react-memo-wisely-link/

MLA
" » Use React.memo() wisely [link]." remy sharp's b:log | Sciencx - Tuesday October 6, 2020, https://www.scien.cx/2020/10/06/use-react-memo-wisely-link/
HARVARD
remy sharp's b:log | Sciencx Tuesday October 6, 2020 » Use React.memo() wisely [link]., viewed ,<https://www.scien.cx/2020/10/06/use-react-memo-wisely-link/>
VANCOUVER
remy sharp's b:log | Sciencx - » Use React.memo() wisely [link]. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2020/10/06/use-react-memo-wisely-link/
CHICAGO
" » Use React.memo() wisely [link]." remy sharp's b:log | Sciencx - Accessed . https://www.scien.cx/2020/10/06/use-react-memo-wisely-link/
IEEE
" » Use React.memo() wisely [link]." remy sharp's b:log | Sciencx [Online]. Available: https://www.scien.cx/2020/10/06/use-react-memo-wisely-link/. [Accessed: ]
rf:citation
» Use React.memo() wisely [link] | remy sharp's b:log | Sciencx | https://www.scien.cx/2020/10/06/use-react-memo-wisely-link/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.