Or using a package that does shallow equal.
Some packages (recompose, react-event-listener) end up requiring and using fbjs for the shallowEqual function, with the reasoning being that, since it's already required by react, it'd save some bits, which makes sense, but is advised against in the readme. This way, they can just use the shallow equal implementation fbjs uses instead of fbjs.
Or using a package that does shallow equal. Some packages (
recompose
,react-event-listener
) end up requiring and usingfbjs
for theshallowEqual
function, with the reasoning being that, since it's already required byreact
, it'd save some bits, which makes sense, but is advised against in the readme. This way, they can just use the shallow equal implementationfbjs
uses instead offbjs
.