UNPKG
anujs-stb
Version:
latest (1.5.0)
1.5.0
1.4.9
a React16-compact mini framework
github.com/RubyLouvre/anu
RubyLouvre/anu
anujs-stb
/
scripts
/
build
/
shallowCompare.index.js
8 lines
(6 loc)
•
258 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{shallowEqual}
from
"react-core/shallowEqual"
;
export
default
function
shallowCompare
(
instance, nextProps, nextState
) {
var
a =
shallowEqual
(instance.
props
, nextProps);
var
b =
shallowEqual
(instance.
state
, nextState);
return
!a || !b; }