Skip to content

React Native Code Review Checklist

Checklist

Sr No.Check
1Folder Structure
  1. All the components, globals, images, redux etc.. Should be written inside the src folder
  2. Images should be there in the images folder under the src folder.
  3. Redux files should be written inside the store folder under the src folder
  4. You can create stack navigator file inside navigation folder under src
2Naming Conventions
  1. A folder and sub folder name should always start with small letters and the files belongs the folders is always in pascal case.
  2. Object and variable declaration should always in camel case statement.
3Best Practices
  1. Divide The Components (split the React Native components into two individual directories: container and plain components)
  2. Declare The Types: It can either be Flow or Typescript
  3. Separate the styles from the components.
  4. Remove console.log() after debugging, It will make app slower.
  5. Create aliases using babel-plugin-module-resolver to avoid nested imports
  6. Use Hooks (avoid class based component)
  7. Use Redux for for the store state (Avoid unnecessary use of redux)
  8. Add fastlane set up for automate development and build release process
  9. Use Platform specific styles.
  10. Alway assign unique key to each element.
  11. create class component when we have to use state otherwise we should use functional component
  12. Use spread operator. It can make your React code much more beautiful and clean
  13. write your api calls within the useEffect for hooks / write your api calls withing the componentDidMount for class component.
  14. Always implement as much client validation as possible at front end level
  15. make sure that the app you are building is responsive
  16. DO use Safe Area View to look good on every iOS device
  17. Use a linter to make your code easier to review.
  18. Lock Dependencies(remove the ^ character in order to lock the dependency on that specific version)
  19. Review your code at least once before creating a pull or merge request
  20. Check internet connectivity for a better user experience