|
|
|
|
|
by acemarke
2907 days ago
|
|
`connect` does a _lot_ of work to ensure that your own components only re-render when necessary: - It checks to see if the root Redux state is different than last time, and bails out if it's the same reference under the assumption that nothing changed - It checks to see if the return values from your `mapState` function are shallow-equality different than last time, and again bails out if they're the same - The handling for `mapState` and `mapDispatch` is heavily memoized to cut down on unneeded work. If you have specific performance concerns with a Redux app, please let me know - I'd be happy to offer advice and point you to possible solutions. But, a blanket statement that "Redux is quite slow" is meaningless without context for what's happening. |
|
We now speed things up buy removing redux and just using events with multiple stores anyone can access - we can easily tune the system and don't have to rely on magic that can never be as efficient. Plus the syntax is much cleaner.