Quantcast
Channel: React/Preact: how to temporarily avoid updating the DOM for a certain component? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Maheer Ali for React/Preact: how to temporarily avoid updating the...

You can use shouldComponentUpdate(). When you return false it will not update the component. shouldCompnentUpdate(nextprops,nextstate){ return Boolean(this.state.Component) }

View Article



React/Preact: how to temporarily avoid updating the DOM for a certain component?

I'm using server-side rendering with Webpack's code-splitting. The server returns the HTML for the component. However, when React initializes, since I'm using code-splitting, the React component I...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images