Hey jorgeer, thanks for the detailed reply
I think I should set something straight: I am trying to understand how Meteor accomplishes the update, not how I should write code to update, which are different things.
It is clear to me that me as a developer should handle state update using the Meteor.call, and that to accomplish that, I should wrap the components using createContainer.
What I am trying to understand is how Meteor interacts with React’s state. Since createContainer updates the props, does it do so using setState? I understood that no, it does not use setState, and I will try to explain why below.
Coming back to the example, I did the tasks tutorial, so I have exactly that function you quoted.
I am particularly interested in this step
(client) App component receives new data through props ->"
I read the documentation you linked and it lead me to https://github.com/meteor/react-packages/tree/devel/packages/react-meteor-data
As I understood it, setState is not used in the process of passing down the props to the wrapped component. I think the component’s state is changed and a forcedUpdate is called
So I guess Meteor’s container wrapper is bypassing the setState somehow, changing the state using Tracker and forcing updates with the new data… Is that it?
Surely I don’t need to understand this to use Meteor, it’s just kind of my learning/thought process to peek under the hood and try to understand what’s going on. I did a “pure” react tutorial before trying meteor and noticed that setState was in the core of React… Since this is so different in Meteor, I was puzzled and I am trying to understand what’s going on. Sorry if I’m being pedantic