infernojs / inferno

:fire: An extremely fast, React-like JavaScript library for building modern user interfaces

Home Page:https://infernojs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issue or feature shallowDiffers inferno

simonjoom opened this issue · comments

commented

just was a look in the code of preact
it there some change in shallow

preactjs/preact@de388d2

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;
}

Hmm, it seems this is some new property added when compiling react jsx. Maybe we should do this change to inferno-compat package

That property seems to be added by https://www.npmjs.com/package/babel-plugin-transform-react-jsx-source I don't recommend using it.