Legacy React addon for performing shallow comparison of props and state to optimize component rendering performance
Overall
score
99%
shouldComponentUpdate optimization
Import shallowCompare
100%
100%
Implement shouldComponentUpdate
100%
100%
Call shallowCompare correctly
100%
100%
Return shallowCompare result
100%
100%
Component renders correctly
100%
100%
Shallow comparison of props and state
Imports shallowCompare
100%
100%
Implements shouldComponentUpdate
100%
100%
Uses shallowCompare correctly
100%
100%
Correct comparison logic
100%
100%
Proper return value
100%
100%
NaN value comparison handling
Import shallowCompare
100%
100%
Implement shouldComponentUpdate
100%
100%
Use shallowCompare correctly
100%
100%
NaN equality behavior
100%
100%
Trigger re-renders on change
100%
100%
Edge case handling for non-object types
Uses shallowEqual
0%
66%
NaN comparison
100%
100%
Zero distinction
100%
100%
Null handling
100%
100%
Undefined handling
100%
100%
Null and undefined handling
Imports shallowCompare
100%
100%
Uses shallowCompare function
100%
100%
Correct function signature
100%
100%
Returns shallowCompare result
100%
100%
Handles null props
100%
100%
Handles undefined values
100%
100%
No redundant validation
40%
60%
Negative zero distinction (+0 vs -0)
Import shallowCompare
100%
100%
shouldComponentUpdate implementation
100%
100%
shallowCompare usage
100%
100%
Return value handling
100%
100%
Zero sign detection
100%
100%
React ecosystem integration (PureComponent/memo equivalent)
Imports shallowCompare
100%
100%
Implements shouldComponentUpdate
100%
100%
Uses shallowCompare correctly
100%
100%
Correct return value
100%
100%
Proper component context
100%
100%
Object.is() based equality checking
Package import
100%
100%
NaN handling
100%
100%
Zero distinction
100%
100%
Shallow comparison
100%
100%
Property count check
100%
100%
Performance optimization - preventing unnecessary re-renders
Import shallowCompare
100%
100%
Implement shouldComponentUpdate
100%
100%
Use shallowCompare correctly
100%
100%
Return comparison result
100%
100%
Props comparison works
100%
100%
State comparison works
100%
100%
Property enumeration (own enumerable properties only)
Import shallowCompare
100%
100%
Use shallowCompare
66%
100%
Handle props comparison
100%
100%
Return correct value
100%
100%
Install with Tessl CLI
npx tessl i tessl/npm-react-addons-shallow-compareTable of Contents