{"version":3,"sources":["node_modules\\react-dom\\lib\\shouldUpdateReactComponent.js"],"names":["shouldUpdateReactComponent","prevElement","nextElement","prevEmpty","nextEmpty","prevType","nextType","type","key","module","exports"],"mappings":";;;;;;;;;;AAUA;;;;;;;;;;;;;;AAcA,QAASA,2BAAT,CAAoCC,WAApC,CAAiDC,WAAjD,CAA8D;AAC5D,GAAIC,WAAYF,cAAgB,IAAhB,EAAwBA,cAAgB,KAAxD;AACA,GAAIG,WAAYF,cAAgB,IAAhB,EAAwBA,cAAgB,KAAxD;AACA,GAAIC,WAAaC,SAAjB,CAA4B;AAC1B,MAAOD,aAAcC,SAArB;AACD;;AAED,GAAIC,UAAW,MAAOJ,YAAtB;AACA,GAAIK,UAAW,MAAOJ,YAAtB;AACA,GAAIG,WAAa,QAAb,EAAyBA,WAAa,QAA1C,CAAoD;AAClD,MAAOC,YAAa,QAAb,EAAyBA,WAAa,QAA7C;AACD,CAFD,IAEO;AACL,MAAOA,YAAa,QAAb,EAAyBL,YAAYM,IAAZ,GAAqBL,YAAYK,IAA1D,EAAkEN,YAAYO,GAAZ,GAAoBN,YAAYM,GAAzG;AACD;AACF;;AAEDC,OAAOC,OAAP,CAAiBV,0BAAjB","file":"shouldUpdateReactComponent.js","sourceRoot":"D:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Given a `prevElement` and `nextElement`, determines if the existing\n * instance should be updated as opposed to being destroyed or replaced by a new\n * instance. Both arguments are elements. This ensures that this logic can\n * operate on stateless trees without any backing instance.\n *\n * @param {?object} prevElement\n * @param {?object} nextElement\n * @return {boolean} True if the existing instance should be updated.\n * @protected\n */\n\nfunction shouldUpdateReactComponent(prevElement, nextElement) {\n  var prevEmpty = prevElement === null || prevElement === false;\n  var nextEmpty = nextElement === null || nextElement === false;\n  if (prevEmpty || nextEmpty) {\n    return prevEmpty === nextEmpty;\n  }\n\n  var prevType = typeof prevElement;\n  var nextType = typeof nextElement;\n  if (prevType === 'string' || prevType === 'number') {\n    return nextType === 'string' || nextType === 'number';\n  } else {\n    return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;\n  }\n}\n\nmodule.exports = shouldUpdateReactComponent;"]}