CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/react-patterns

React patterns — always apply error boundaries, loading states, accessible markup, proper hooks, controlled forms, stable keys, and correct memoization

87

1.83x
Quality

80%

Does it follow best practices?

Impact

99%

1.83x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Evaluation results

100%

66%

Sales Dashboard

Criteria
Without context
With context

Error boundary wraps dashboard

0%

100%

Error boundary fallback has role=alert

0%

100%

Loading state rendered

100%

100%

Error state with retry and role=alert

14%

100%

Empty state handled

0%

100%

useEffect cleanup prevents stale updates

0%

100%

Stable unique keys on stat cards

100%

100%

Error state cleared on success

0%

100%

TypeScript interfaces for props

100%

100%

Props destructured in signature

100%

100%

96%

34%

Product Inventory Table

Criteria
Without context
With context

ProductRow wrapped in React.memo

0%

100%

Flag handler stabilized with useCallback

0%

100%

Filtered/sorted list computed with useMemo or inline

100%

100%

No useEffect for derived state

100%

100%

Stable keys on product rows

100%

100%

No inline objects to memoized children

100%

100%

aria-live on result count

0%

100%

TypeScript interfaces for props

100%

100%

useCallback NOT used for native-only callbacks

100%

50%

Props destructured in signature

100%

75%

100%

26%

Notification Feed

Criteria
Without context
With context

Interval cleanup in useEffect

100%

100%

Functional updater for state in interval

100%

100%

Unread count not in useEffect

100%

100%

No object in useEffect deps

100%

100%

Stable keys on notification items

100%

100%

Error handling with role=alert

0%

100%

aria-live on unread count

0%

100%

TypeScript interfaces for props

100%

100%

Loading state on initial render

0%

100%

Props destructured in signature

100%

100%

100%

62%

User Profile Editor

Criteria
Without context
With context

Controlled inputs

100%

100%

e.preventDefault on submit

100%

100%

noValidate on form element

0%

100%

Client-side validation with error messages

0%

100%

aria-required on required inputs

0%

100%

aria-invalid bound to error state

0%

100%

aria-describedby links to error element

0%

100%

role=alert on error messages

0%

100%

Labels with htmlFor

100%

100%

Loading state during save

100%

100%

TypeScript interfaces for props

100%

100%

100%

37%

Todo List

Criteria
Without context
With context

Stable keys not index

100%

100%

Controlled input for new todo

100%

100%

Form prevents default

50%

100%

Empty input validation

80%

100%

Accessible delete/toggle buttons

35%

100%

role=alert on validation errors

0%

100%

aria-required on todo input

0%

100%

Remaining count not in useEffect

100%

100%

TypeScript interfaces for props

100%

100%

Props destructured in signature

100%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents