CONTACT US

6 React Best Practices For 2021

  • Make use of event.target.name for event handlers
  • Avoid manually binding event handlers to this?
  • Make use of React hooks to update your state
  • Cache expensive operations with useMemo
  • Decouple functions into functional functions to improve code quality
  • Create custom React Hooks

React Native Performance: Do and Don’t

Do:

  • Use an Image Caching Solution
  • Use appropriate image size
  • Avoid unnecessary renders
  • Use nativeDriver with Animated library
  • Use Flipper to debug issues
  • Use Hermes

Don’t

  • Leave console statements in the source code
  • Use Scrollview to render a huge list of data items

 

Article link copied

Close button