issue or feature shallowDiffers inferno
simonjoom opened this issue · comments
simz commented
just was a look in the code of preact
it there some change in shallow
function shallowDiffers(a, b) {
- for (let i in a) if (!(i in b)) return true;
- for (let i in b) if (a[i]!==b[i]) return true;
+ for (let i in a) if (i !== '__source' && !(i in b)) return true;
+ for (let i in b) if (i !== '__source' && a[i]!==b[i]) return true;
return false;
}
Sampo Kivistö commented
Hmm, it seems this is some new property added when compiling react jsx. Maybe we should do this change to inferno-compat package
Sampo Kivistö commented
That property seems to be added by https://www.npmjs.com/package/babel-plugin-transform-react-jsx-source I don't recommend using it.