React TL’DR #17 – Top React Content From February 2021

Share


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

Double Your React Coding Speed With This Simple Trick

4 easy tips on how to become a faster React developer:

  • Never format your code by hand
  • Never import modules by hand
  • Jump around (with hotkeys) like a pro
  • Use ESLint linting

To be fast you need:

  • Separate business logic from the view logic
  • Use TypeScript to experiences fewer bugs
  • Use TypeScript to enable powerful IDE features: linting, name refactoring, autocompletion
  • Define TypeScript types before writing code for the rapid architecture design
  • Split your code into many small reusable files to reduce clutter
  • Ask your IDE to format code and import modules
  • Jump around files with hotkeys
  • Practice refactoring

Node v15.6.0 (Current)

Key takeaways:

  • Next.js improves React development and deployment
  • Next.js is a powerful framework around de-facto standard React
  • Front-ends are globally distributed – Next.js supports CDN from the start
  • Front-end engineers need short feedback loops
  • Fast feedback drives front-end quality
  • Adopt new front-end tech one page at a time
  • Test in production-like preview builds
  • Use headless, visual regression tests for GUI components
  • Testing benefits from React being functional and declarative
  • The risks and rewards of microservices
  • Emerging patterns and systems mitigate microservices risk

Learn best practices and read the most useful content only


What is React TL;DR?

React TL;DR helps you decide which content is worth your time.

We don’t use any engines or tools. It is all selected by ourselves, based on what we have learned and gained profit from. No b#$%it provided.

Say hello to React TL;DR – your filter for most useful React content.

Comments
Leave a Reply

View Comments (0)...

Related articles:

React TL;DR #16 – Top React Content From January 2021

2020 React TL;DR Recap. Top React Content From 2020