Can we stop re-render of child component if parent component is updating the state that we are using in child comp. in react?
Below is simple component of react.
Can we modify in any like using ref or anything so that child component won’t re-render even if the state value changes from parent and still child component gets the latest value.
Element Not Updating in DOM After its React State is Changed
I have a react variable called dataTable
managed with useState()
that holds a table element, embedded in the HTML in my site as {dataTable}
.