Skip to content

gurpreet-hanjra/react-code-review-checklist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

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

About

An opinionated code-review checklist for React applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published