Every line of 'shouldcomponentupdate hooks' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
58 function callUpdateHooks (oldVNode: VNode, vNode: VNode): VNode { 59 const [updatedOldVNode, updatedVNode] = reduce(function ([oldVNode, vNode]: [VNode, VNode], module: Module): [VNode, VNode] { 60 return [vNode, module.update(oldVNode, vNode)] 61 }, [oldVNode, vNode], modules) 62 63 const update = !isUndef(updatedVNode.data) && updatedVNode.data.update || id 64 65 return update(updatedOldVNode, updatedVNode) 66 }
27 shouldComponentUpdate() { 28 return React.addons.PureRenderMixin.shouldComponentUpdate.apply(this, arguments); 29 }
27 function shouldComponentUpdate(componentType, updateComponentTypeArr) { 28 if (updateComponentTypeArr.includes(componentType)) { 29 return true; 30 } else { 31 return updateComponentTypeArr.includes(/* All */1); 32 } 33 }
229 update(component, data) { 230 const changes = getChanges(component); 231 if (data.forceUpdate || this.shouldUpdate(component, changes)) { 232 this.willUpdate_(component, changes); 233 this.patch(component); 234 } 235 }
20 export default function performElementUpdate (component) { 21 let oldVirtualElement = component.virtualElement 22 let oldDomNode = component.element 23 let newVirtualElement = component.render() 24 refsStack.push(component.refs) 25 let newDomNode = patch(component.element, diff(oldVirtualElement, newVirtualElement)) 26 refsStack.pop() 27 component.virtualElement = newVirtualElement 28 if (newDomNode !== oldDomNode) { 29 throw new Error("etch does not support changing the root DOM node type of a component") 30 } 31 }
143 export function commitUpdate( 144 instance: Element, 145 preparedUpdateQueue: Array<[string, any]>, 146 type: any, 147 oldProps: any, 148 _: any, 149 { isSvg }: HostContext, 150 ): void { 151 DOMComponent.updateProps(instance, preparedUpdateQueue, oldProps, isSvg); 152 }
29 shouldComponentUpdate(nextProps) { 30 return this.view.onPropsUpdate(this.props, nextProps) 31 }
40 value: function shouldComponentUpdate(_ref) { 41 var media = _ref.media; 42 43 return this.props.media.currentTime !== media.currentTime; 44 }
46 value: function shouldComponentUpdate(_ref) { 47 var media = _ref.media; 48 49 return this.props.media.isFullscreen !== media.isFullscreen; 50 }
23 willUpdate(props: P) {}