Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to prevent render in react

shouldComponentUpdate(nextProps, nextState) {
  return false;
}
//note that if shouldComponentUpdate returns true, then the component will
// be updated. This is usefull to conditionally reload the "view" 
// 
 
PREVIOUS NEXT
Tagged: #prevent #render #react
ADD COMMENT
Topic
Name
4+2 =