Can a React-Redux app really scale as well as, say Backbone? Even with reselect. On mobile

前端 未结 2 1741
挽巷
挽巷 2020-12-07 08:02

In Redux, every change to the store triggers a notify on all connected components. This makes things very simple for the developer, but what if you have an appl

2条回答
  •  再見小時候
    2020-12-07 08:39

    This may be a more general answer than you're looking for, but broadly speaking:

    1. The recommendation from the Redux docs is to connect React components fairly high in the component hierarchy. See this section.. This keeps the number of connections manageable, and you can then just pass updated props into the child components.
    2. Part of the power and scalability of React comes from avoiding rendering of invisible components. For example instead of setting an invisible class on a DOM element, in React we just don't render the component at all. Rerendering of components that haven't changed isn't a problem at all as well, since the virtual DOM diffing process optimizes the low level DOM interactions.

提交回复
热议问题