Posts

useMemo Hook vs PureComponent

Image
What is differences and similarties ? Similarities Goals & Objective are Same   2. Solve Same Problem of react js Component Render Functions   3. Prevent Unnecessary Render Component  4. Same used Shallow Comparation of Object  5. Both Focus on Performence Optimization Differences useMemo Hook PureComponent useMemo used in functional compoment PureComponent is used class componenrt Use useMemo Hook ReactJS Pure Components const cachedValue = useMemo(<calculateValue>, <dependencies>) export default class Test extends React.PureComponent There is choice for memoizations particular state and props fields through 'dependencies' parameter There is no choice for memoizations particular state and props field Youtube Video www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com www.akcoding.com ...