CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-react-addons-shallow-compare

Legacy React addon for performing shallow comparison of props and state to optimize component rendering performance

Overall
score

99%

Overview
Eval results
Files

Evaluation results

100%

Product List Component with Render Optimization

shouldComponentUpdate optimization

Criteria
Without context
With context

Import shallowCompare

100%

100%

Implement shouldComponentUpdate

100%

100%

Call shallowCompare correctly

100%

100%

Return shallowCompare result

100%

100%

Component renders correctly

100%

100%

100%

Performance-Optimized User Profile Component

Shallow comparison of props and state

Criteria
Without context
With context

Imports shallowCompare

100%

100%

Implements shouldComponentUpdate

100%

100%

Uses shallowCompare correctly

100%

100%

Correct comparison logic

100%

100%

Proper return value

100%

100%

100%

Numeric Data Validator Component

NaN value comparison handling

Criteria
Without context
With context

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%

90%

20%

Comparison Utility

Edge case handling for non-object types

Criteria
Without context
With context

Uses shallowEqual

0%

66%

NaN comparison

100%

100%

Zero distinction

100%

100%

Null handling

100%

100%

Undefined handling

100%

100%

98%

1%

Component Update Optimizer

Null and undefined handling

Criteria
Without context
With context

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%

100%

Zero Sign Checker Component

Negative zero distinction (+0 vs -0)

Criteria
Without context
With context

Import shallowCompare

100%

100%

shouldComponentUpdate implementation

100%

100%

shallowCompare usage

100%

100%

Return value handling

100%

100%

Zero sign detection

100%

100%

100%

Performance-Optimized User Card Component

React ecosystem integration (PureComponent/memo equivalent)

Criteria
Without context
With context

Imports shallowCompare

100%

100%

Implements shouldComponentUpdate

100%

100%

Uses shallowCompare correctly

100%

100%

Correct return value

100%

100%

Proper component context

100%

100%

100%

Props Equality Checker

Object.is() based equality checking

Criteria
Without context
With context

Package import

100%

100%

NaN handling

100%

100%

Zero distinction

100%

100%

Shallow comparison

100%

100%

Property count check

100%

100%

100%

Performance-Optimized User Card Component

Performance optimization - preventing unnecessary re-renders

Criteria
Without context
With context

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%

100%

10%

Component Props Comparison Tool

Property enumeration (own enumerable properties only)

Criteria
Without context
With context

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-compare
Evaluated
Agent
Codex

Table of Contents