> It took me 2 weeks to understand react, and much more to actually write decent code with it. Practically, react is very unproductive without something like create-react-app because you have to take so many decisions about it for every new project.
I won't argue that bootstrapping a React project is more complicated than a Vue project. I will argue that React's developer ergonomics are much better.
> Everybody has a boilerplate one of course. Nothing is standardized, so the ecosystem is not reusable.
Not sure what you mean. We use CRA at my company and I can comfortably drop into projects I've never seen before with complete confidence.
> Simple things like placing a setInterval()/clearInterval() at the right place
This doesn't make sense to me. The pattern for setting/clearing an interval with the class-based React API is identical to Vue. With React's hook API it becomes even easier.
> or conditionally settings classes on stuff is not straightforward
How? It's just JavaScript, write a conditional. This is exactly what I'm talking about: you don't need to know how to conditionally set a class in React, you just need to know how to conditionally set a value in JavaScript. I get really tired of the "how do I do task X in Framework Y". I want to ask that question as few times as possible.
My go-to example to explain why I find React so much simpler is Vue's slots. It's an entire API that many people find confusing to replicate something that comes for free in React.
> I will argue that React's developer ergonomics are much better.
Depends for what. For industrial size project, a little, because of the better typescript support. But that's it. You have the same vscode and browser extensions otherwise.
> we use CRA at my company and I can comfortably drop into projects I've never seen before with complete confidence.
First, on this part I'm talking about JS in general. Only a minority of projects use react.
Of course, not all projects use CRA. Many projects use different versions of react with different things you can do with it. Many projects will chose different convention for adapting components, passing children rounds, talking to parent, binding function, etc.
And I _never_ see two react projects with the same me directory tree. There is no strong convention on it.
Then you must chose.
One project is using an inhouse store with useContext, on other use manual redux with that convention, on use redux with that other convention, one use redux-toolkit, one use manual mobx with that convention, one use mobx react, etc. None of them work the same. None of them integrated the same.
And that's just for one lib. One project as many of such libs, all integrated manually.
And yet, the CRA experience is supposed to be one of the best integration you can have.
When you come from another world like Ruby or Python, it's a mad house.
In fact, I'll argue than only experienced programmers manage to get a consistent experience in the JS world.
> Simple things like placing a setInterval()/clearInterval() at the right place
Nope, in react you can use lifecycle OR hooks. You have to choose. And they don't work the same at all.
In vue, for a simple hello world, you can even place the setInterval outside of the component and hapily modify the model, it will update. You don't have to figure out the lifecycle for small app, only for a reusable component.
>How? It's just JavaScript, write a conditional. This is exactly what I'm talking about: you don't need to know how to conditionally set a class in React, you just need to know how to conditionally set a value in JavaScript.
C strings are just an arrays of char, so you don't have to learn those pesky high level string objects in those modern language with all their new fancy API.
> My go-to example to explain why I find React so much simpler is Vue's slots. It's an entire API that many people find confusing to replicate something that comes for free in React.
In both case the user will google "how to get a reference on children components". There is now way you can guess that it's passed as props.
And then, you will want to have several children at different places. And now the illusion breaks, because props.children doesn't work, you have to manually pass each children as props, and you can use them nested as before. And because it's not a "feature", but a convention, you have to know that you need to do that for components that use it. So it's no more natural that slots.
While in vue, you still use slots, you just give them names. The feature is congruent from the simple use case, to the advanced one.
So maybe for the simple case it took 5 minutes in react, and 6 in vue, and the same time for the complex case. For a rarely used feature.
I won't argue that bootstrapping a React project is more complicated than a Vue project. I will argue that React's developer ergonomics are much better.
> Everybody has a boilerplate one of course. Nothing is standardized, so the ecosystem is not reusable.
Not sure what you mean. We use CRA at my company and I can comfortably drop into projects I've never seen before with complete confidence.
> Simple things like placing a setInterval()/clearInterval() at the right place
This doesn't make sense to me. The pattern for setting/clearing an interval with the class-based React API is identical to Vue. With React's hook API it becomes even easier.
> or conditionally settings classes on stuff is not straightforward
How? It's just JavaScript, write a conditional. This is exactly what I'm talking about: you don't need to know how to conditionally set a class in React, you just need to know how to conditionally set a value in JavaScript. I get really tired of the "how do I do task X in Framework Y". I want to ask that question as few times as possible.
My go-to example to explain why I find React so much simpler is Vue's slots. It's an entire API that many people find confusing to replicate something that comes for free in React.