From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Benefits of Reselect

Benefits of Reselect

Welcome back. Let's discuss the benefits of using reselect over the use selector hook. The first and the very important benefit is it avoids re-computation unless it's actually necessary. We should always be avoiding unnecessary re-rendering and identifying the causes which are making re-renders on the screen. A good react developer should always be focusing on putting logs and verifying things while making a component. Because the real world projects does not have simple and easy kind of components. And even though you just develop a component and push it to the application, it's not guaranteed unless you actually check for performance issues. So reselect reduces the unnecessary re-rendering as well as it helps with derived state. Whenever you have scenarios like sorting the data, filtering the data or performing any kind of aggregations, which is very common in modern applications where you have to see the result in different aspects, then for this kind of data display you should…

Contents