How to listen for only changes in a specified props

there are three props, in the component how name,age,gender, listens for changes only to age

Mar.05,2021

listen for props changes through the shouldComponentUpdate life cycle. When age changes, return ture, re-render ()


use watch

Menu