Skip to content

Latest commit

 

History

History
51 lines (26 loc) · 1.13 KB

code-review-checklist.md

File metadata and controls

51 lines (26 loc) · 1.13 KB

react-code-review-checklist

An opinionated code-review checklist for React applications.

Keep code DRY (Don't repeat yourself)

Enforce propTypes

Use shape for propTypes wherever applicable

No commented code

Keep components small

Event listeners removed

setState callback function is used

JSX markup should be no more than 50 lines

Stateless components for components that don't use state

Naming conventions followed for variables, file names, translations

No unused variables and functions/methods

Removed unused packages from NPM

No api calls in containers, delegate to Stores

Use instead of

No unused props are being passed

Should have descriptive comments to functions/code, even one liner

Store mock data for unit tests, avoid cluttering of mock code

Create mock data using loops, for easy maintainability

No state updates in loop

Move data to constants if used in multiple files, like statusText and status code

Use fat arrow instead of var that = this

Use let/const over var

Use '' in JS code and "" in JSX

No useless constructor