News for hackers. Stuff that matters.
Re:Redux Sucks with React-Native by bacro on Tuesday November 27, 2018 @09:53AM (#18542695)
You are only telling part of the story here. What about the connect in the UI? mapStateToProps is called every single time the store is updated unless you provide a areStatesEqual function in each component you intend to connect to the store. This seems much more complicated that it should be. I have a react native app that receives market data quotes in real time and I have used redux to store all those market data updates along other data and now I regret it. If I had stored the data in POJOs and implement a very basic implementation of observer pattern would not only be more performant than would have been easier to implement. To connect the POJOs to the UI, I would only have created a smart component that connected to it and that's it. No redux, redux-sagas, areStatesEqual, mapStateToProps, reselect and all that. What do you think?

There are no comments on this comment yet.