omniscientjs / omniscient

A library providing an abstraction for React components that allows for fast top-down rendering embracing immutable data for js

Home Page:http://omniscientjs.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

isEqualProps should compare plain JS objects too

reverofevil opened this issue · comments

I have a huge array that I would like to put into a structure and get swap event when the whole array gets swapped. Because of a size of that array I'm no fan of converting it into an immutable data structure. Yet when an array gets swapped, omniscient's isEqualProps method checks only if it was a change of a cursor or a change in immutable data structure, totally disregarding the fact an array has been changed. Is such behaviour considered a bug?

AFAIK, isEqualProps should check nested deep value check. See the documentation for lodash.isequal. But I'm not sure how it handles swapping in a large nested vanilla object in regards to keys. This might be a bug, tho, as I've never encountered this use case before. But it should support it, but I don't know how the key diff in the swap event should be handled.