These are chat archives for jdubray/sam
fetchis more productive"
When I look at minimal React it's just a virtual-DOM library with optional JSX and some lifecycle hooks (to be used when appropriate, not abused). You could say the same about the other virtual-DOM libs I mentioned.
Just because people have misused and abused React does not mean React itself is bad. If Snabbdom had become popular instead of React, and people were abusing, misusing, piling on libs etc. with Snabbdom, would that make Snabbdom bad?
view = function(model). JSX is optional, else you can use regular JS with e.g. JSnoX. As for the lifecycle methods, I don't use them except in special cases, for example when needing to use a non-declarative jQuery widget.
@jdubray I agree but only because of the way React is presented, explained, shown how to use in examples, etc.
This is entirely avoided when you stay away from using state, props, setState, etc.
Instead, just use
ReactDOM.render(view, element) where
view = function(model),
model is a plain JS object (your single state object), and it returns the view.
But I understand what you are saying, this is not what is usually presented in React tutorials. I'd say the best practice is to "unlearn" all that and just stick to what I said above.