Is console.log the right metric to compare these frameworks with though?
The user doesn't see it, and it isn't shown in the UI, so is the entire concept of "which changes first" or "inconsistencies" lean more toward when side-effects (like printing to the console) occur rather than consistency in the UI?
This might be a bit too much of a "creating a problem to satisfy a solution" situation.
console.log is the easiest way to show where it can be observed by a developer. There is probably only the smallest window for things to get out of sync here between the state and the UI, but for React for example this consistency is very important to them. Others to varying degree.
The interesting part I think is that these all have very similar syntax and they work a little differently. I don't think this trivial example is as important as what it shines a light on in terms of mental model and values etc...
In this case, console.log is merely used to show the behavior. In real-life applications, it's the output of this console.log example that would otherwise go into your side-effects' calls that may lead to unpredicted behavior.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is
console.log
the right metric to compare these frameworks with though?The user doesn't see it, and it isn't shown in the UI, so is the entire concept of "which changes first" or "inconsistencies" lean more toward when side-effects (like printing to the console) occur rather than consistency in the UI?
This might be a bit too much of a "creating a problem to satisfy a solution" situation.
console.log is the easiest way to show where it can be observed by a developer. There is probably only the smallest window for things to get out of sync here between the state and the UI, but for React for example this consistency is very important to them. Others to varying degree.
The interesting part I think is that these all have very similar syntax and they work a little differently. I don't think this trivial example is as important as what it shines a light on in terms of mental model and values etc...
In this case, console.log is merely used to show the behavior. In real-life applications, it's the output of this console.log example that would otherwise go into your side-effects' calls that may lead to unpredicted behavior.