The cabals property in store updates very often - i.e on new message, or even when a user join/leaves etc - and the main layout component directly subscribing to it causes it to re-render on every small change. Moving the required logic into a selector reduces the unwanted re-rendering of the component.
p.s: This perf improvement should be applied across other parts of app too, which I am planning to undertake incrementally ^_^
The
cabals
property in store updates very often - i.e on new message, or even when a user join/leaves etc - and the main layout component directly subscribing to it causes it to re-render on every small change. Moving the required logic into a selector reduces the unwanted re-rendering of the component.p.s: This perf improvement should be applied across other parts of app too, which I am planning to undertake incrementally ^_^