Reactjs 当且仅当调用render时是否调用componentDidUpdate?
React组件具有Reactjs 当且仅当调用render时是否调用componentDidUpdate?,reactjs,Reactjs,React组件具有render方法,并且可以具有componentdiddupdate方法。我的问题是:componentdiddupdate是否在每次渲染后都会被调用,是否有任何时候componentdiddupdate会被调用,但render不会被调用?componentdiddupdate总是在渲染后被调用。因此,如果使用shouldComponentUpdate阻止渲染,例如,diddupdate将永远不会被调用 是否有调用componentDidUpdate但不调用render的情况?
render
方法,并且可以具有componentdiddupdate
方法。我的问题是:componentdiddupdate
是否在每次渲染后都会被调用,是否有任何时候componentdiddupdate
会被调用,但render
不会被调用?componentdiddupdate
总是在渲染后被调用。因此,如果使用shouldComponentUpdate
阻止渲染,例如,diddupdate
将永远不会被调用
是否有调用componentDidUpdate但不调用render的情况?
否,componentdiddupdate
取决于要调用的render
。但是oposite可能发生,componentdiddupdate
componentdiddupdate
总是在render
之后调用。因此,如果使用shouldComponentUpdate
阻止渲染,例如,diddupdate
将永远不会被调用
是否有调用componentDidUpdate但不调用render的情况?
否,componentdiddupdate
取决于要调用的render
。但是oposite可能发生,componentdiddupdate