I have above components, Repo and RepoList. I want to update the tag of the first repo (Line 14). So I dispatched an ADD_TAG action. Before I implemented shouldComponentUpdate, the dispatch takes about 200ms, which is expacted since we are wasting lots of time diffing <Repo/>s that haven't changed.
After added shouldComponentUpdate, dispatch takes about 30ms. This is much better, but imagine if we have many updates like this, or <Repo/> is more complicated than current one, we won't be able to maintain 60fps.
My question is, for such small udpates to a nested component's props, is there a more efficient way to update the content? Can I still use Redux?
I got a solution by replacing every
tagswith an observable inside reducer. Something likeThen I subscribe to their values inside Repo component using https://github.com/jayphelps/react-observable-subscribe. This worked great. Every dispatch only costs 5ms. But I feel like this is an anti-pattern in Redux.