4 ms·
I had the same vibe and I still have it regarding Nuxt 3. Had it with React when it moved to functional components from class components. But I convinced myse
by holistio 2y ago
I had the same vibe and I still have it regarding Nuxt 3.
Had it with React when it moved to functional components from class components.
But I convinced myself I have to dive deep enough to understand it since a lot of people seem to like it. And now I like the Composition API more in general.
Apart from one tidbit: I constantly forget where I need to put `.value` after a variable name to extract its... value.
- euoia 2y agoThe .value thing is dreadful. Is it really necessary? I still prefer options API.
- lloydatkinson 2y agoIt really is awful and smells of leaky abstraction. Now that this is the recommended way of writing Vue, I’d be really interested in your opinion on React. Compare the “ref” in Vue with useState hook in React. With the useState you get back two items: the value, and a setter. Now every time you access the value you simply access it like a variable because it is.
- rty32 2y ago[flagged]
- lloydatkinson 2y agoWhy are you under the pretence I don’t know the difference? I clearly know the difference. I’m discussing the ergonomics of the API and its resulting DX. Sigh, I wish people put some effort into actually reading the thing before posting opinions.
- rty32 2y agoThat's just how Proxy works in JavaScript. You might want to read a bit more about the underlying mechanism.
- PikachuEXE 2y agoI think of it as a wrapper object (instead of raw value) so we are getting values from (wrapperObjectVariable).value not valueVariable
- lloydatkinson 2y agoI raised the same concerns multiple times (there was a whole drama thread on GitHub issues at the time) about all of this and it’s clear that the Vue team don’t really care about developer experience or keeping consistent APIs. If they were going to poorly clone react hooks api then I decided it wasn’t worth my time sticking to the niche framework and went back to react which I now really enjoy. That and the bad TS support and broken dev tooling for years and the endless deprecated and abandoned tools like Vue CLI replaced by Vite and Vuex replaced by Pinia just highlighted the absurdity of trying to continue using Vue. Also, JSX/TSX is clearly a superior approach with its vast ecosystem of support. Vue can use TSX but good luck with its single docs page and GitHub issues about it open since 2021.
- bazoom42 2y ago> the Vue team don’t really care about developer experience This is how you stir up drama instead of constructive discussions. Clearly the team do care quite a lot about developer experience, but they might have different ideals and goals than you do. So lets discuss those differences as adults.
- lloydatkinson 2y ago[flagged]
- bazoom42 2y agoVue is all about developer experience. It is a framework! But you can’t make everyone happy which is why there are multiple frameworks. If React makes you happy, good for you. Vue made different trade-offs in order to achieve a different DX. Looking into the different trade-offs is interesting.
- Muromec 2y ago"Our highly educated and well ret... regarded colleges from a different department have different priorities that do not seem to contribute to our shared goal as defined by the Policy which our dear leadership bless us with" (finishes writing and takes 1h lunch break)
- Muromec 2y ago> I constantly forget where I need to put `.value` after a variable name to extract its... value. You are supposed to used fancy ide that everyone uses and typescript do yell at you if use guess wrong.
- rty32 2y agoBeing conscious of variable types and function signatures helps you avoid trivial errors and become a more efficient developer. That's just a fact. You can argue with it or ignore it however you want, but that's simply true. I also know as a matter of fact that I am more productive than many of my colleagues when working with non statically compiled languages, and that my code is more robust, partly due to the typing I use everywhere. I have colleagues that write JavaScript functions that takes a parameter that could be 4 different types of objects, completely undocumented, and they don't know what's happening one week after shipping the code. I can't stop them doing stupid things like that. They like wasting their life debugging things and refreshing the browser, what can I do.