How can I bypass Redux gears effectively?

I just started using Redux , and like any developer, I am concerned about performance . The Redux documentation says that whenever an action starts, all reducers go through the search for the corresponding action function using the switch statement.


Now suppose we have a huge application with many actions. Whenever one of them trips, all gearboxes will pass. Apparently, almost all gearboxes are not needed for this action, but Redux will cross them, even if they have nothing to do with the initiated action. How can this be effective?

+4
source share
1 answer

According to the comments already given: some function calls and switch statements are unlikely to be significant for performance, especially taking into account all other work performed inside the application.

The Redux FAQ is dedicated to this topic ( Redux FAQ: Performance ). It also discusses the overall performance and scalability of Redux (Redux FAQ: Performance ).

, , React Redux: Redux, 6. , .

+2

Source: https://habr.com/ru/post/1666937/


All Articles