
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
| 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 |
Comments
Post a Comment