I come from a Meteor/blaze background so I’m very familiar with using reactiveVar/reactiveDict and the Session objects to maintain reactivity for components that need to re-render on changes.
I’m writing a new React app with Meteor and want to get your opinions on the pro’s/con’s of continuing to use reactive variables vs using redux to manage state and reactive re-rendering.
I’d say that I’m equally familiar with both paradigms, so my main concerns are:
Performance / overhead. Some of the variables will be updated every second or even 2-10 times/sec. So if one takes significantly less client CPU that would be preferable.
Specific limitations of one or the other that I should be aware of in terms of using them to make components automatically re-render when data changes.
Anything else I should know from people who’ve done this before
Note, I’m planning on using Meteor’s pub/sub to get any rapidly changing data from the server (along with methods and regular API CRUD calls for static data), and also probably tying some data to local collections defined in minimongo (which IMHO is much easier than using redux as a data store). So the question is mainly about using one or the other to enable reactive updates of various components in the UI. I do have a slight bias toward using redux only because that’s something every React developer is already familiar with, while most would require some time to get familiar with Tracker.autorun and reactive variables. But if reactiveVar is a better solution for other reasons, that’s fine.