Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.58 KB

File metadata and controls

38 lines (26 loc) · 1.58 KB

React Best Practices and Design Patterns

Welcome to the code repository for the Medium article "Best Practices and Design Patterns in React.js for High-Quality Applications".

This repository contains the same code examples that were presented in the article, but in an organized and downloadable format. You can easily download or copy the code from here and use it in your React projects to implement the best practices and design patterns discussed in the article. The examples in this repository demonstrate how to build scalable, maintainable, and high-quality React.js applications, and how to apply these practices in your own projects.

The code examples are separated into three main folders:

1. Best Practices

This folder contains code examples for the following best practices:

  1. Small components
  2. Pages and presentational components
  3. DRY with array mapping

3. Separation of Concerns

This folder contains code examples with the following:

  1. Custom hooks
  2. Services

3. Design Patterns

This folder contains code examples for the following design patterns:

  1. Higher-Order Components (HOC)
  2. Render Props
  3. Compound Components
  4. Memo
  5. React.Lazy
  6. Context
  7. Reducers
  8. Keys

Usage

You can use the code examples in this repository as needed in your React projects. Simply navigate to the appropriate folder and use the code as needed in your own project.

Be sure to read the article for more detailed explanations and best practices for each topic.