It was because of Angular, I felt React seems great, now because of React, Vue feels Awesome. Many things feel natural in vue than react. I mean the concept of useRef, seems so daunting in React compared to vue. Great Video!
personally I like vue more, if I was a business owner or If I wanted to create a personal commercial app I'd use vue, but the fact is there are much more react jobs in the world than vue so I have to focus on react
I just came to try react from vue dev and after getting really well with vue , vue is the best !!! Sorry react complicates unnecessary stuff while vue simplifies it for the same output and same resautts , I dont care if there is job market for react more than vue , but beleive me if there is not ..... there will be in 2 years
I am advanced React dev. When i look into Vue, its looks so stupid. You can do stuff in React in 1.000.000 ways, you are free of your choice to do as you feel comfortable. I think you are not even scratched React. 😁 When you start to write React self controlled components, libraries, custom hooks to utilize React functionality, when you overcome all React lifecycle problems and understanding, then we can talk. I usually stop watching React videos when i see index as key in React map.
One is inserting JS in HTML and the other is inserting HTML in JS. At EOD, both are doing exactly the same thing. Developer should select on the basis of no of jobs, how much you would learn from them, code quality in terms of expressiveness. I'd say in terms of these criteria REACT.JS is far more ahead of VUE.JS. I admire the simplicity of Vue.js. I've worked on both Vue.js and React.js but apart from simplicity, the main thing that comes is JOBS. We know very well that number of jobs is the selecting factor of frontend libraries or frameworks. I live in INDIA and here jobs of vue.js are very few as compared to React.js. I'd say react makes you better JS developer obviously that's my personal preference. In the end, Developers should learn both.
I love your content Erick! I learned Vue pretty much only watching your videos (coming from vanilla js). I think some "reacting to your code" videos would be awesome, and they could pump up your counters also ;). Wish you the best, and thanks for all the awesome content!
Elegant, readable, sure. But anyone who knows React can make better large-scale frontends than Vue. There's a reason most of the job listings are React and besides Angular it's the only thing considered for enterprise applications.
think the useMemo you did should've been a 2nd useEffect (if u had any before - u can have multiple), otherwise useMemo is supposed to store value to a variable, while if u'd pass it a function as a prop to another component, then u'd use useCallback
I love Vue yin-yang style; you get the HTML and JS in separate sections and both share a little bit of each other's. In the other hand React looks more like a bar code; you get a bundle of HTML with JS which can be hard to read. By the way, I might be the only person that likes option API of VUE. I think composition API is good, but the reason of its existence is only organizational and to me Options API is better organized. If a component grows too much, split it and make a child component 😉
I write my React useMemos exactly how I write my Vue computed properties. I assign it to a variable, it's dependent on a property or a piece of state, then it returns the calculated value. I use useEffect like how I would use watch/watchEffect hooks or Vue's lifecycle hooks. Personally I only had to use useCallback one and that was for a specific use case for a work related problem.
Vue looks like an easy learning curve on some things but a little messy for me from coming from React. At the same time learning react hooks now is not hard really compared to older React with class components, that was more tedious. The most important hooks are useState, useEffect. For me it makes sense how React changed to hooks as it's pure functional components, no more classes, no more this, no more super. Separating your state from stateful components (components that manage state) to dumb components (stateless components.) It organizes that in a nice way I think. Once you get past the small learning curve and think in React, it's logic is pretty nice.
I don't care, frameworks / libs are tools for solving problems. There is no best, only suitable. It is meaningless to discuss which is better, most of the discussion i see in comments are subjective based on their personal preference.
Yes and single file components are great, I generally use .vue files from some other project in some other future project, by simply copy/paste, it includes CSS everything and works out of the box. react I believe uses a central CSS file, making it harder to reuse the component. Also something who is JS expert may not be an HTML expert or CSS expert. Keeping these things separately in a large team helps, so that the designer can't focus on the UI, and the programmer on the logic. In vue HTML I can easily swap bootstrap to tailwind, as there is a clear separation of HTML, CSS and JS.
@@cyberpunkdarren nah, look at part 2, jsx. Yes it is bad if you think it is HTML. I used to view it like that too. But there is no HTML in React besides just the main index of your spa. Everything is javascript, separation of concerns is not on view and logic. Just a different mental model.
@@ekagib That's worse then. There should be familiar web markup for views. Bastardizing javascript and markup into jsx is farther from the core w3c web stack and that makes it more difficult and risky to use.
as a person who deals with both this video seemed biased but you did mention it as your personal preference which was nice. jsx is much more powerful which makes certain difficult task very easy but vue loops are easy to learn but I don't think we should prefer something just because it easy to learn because learning is not the main goal, productivity is. Still I think vue cli is just better.
I completely agree in that Vue is easier to pick up than React and you write less code in Vue. Like v-model saves me a lot of time not having to create an emitter in Vue. I wish I could double bind in React. But, to me, React and Vue are so similar that I find myself in a situation when I work in Vue, I wish I was working in React instead and vice versa. I guess it is because both are strong in things that the other one is weak on. For instance, Vue hooks are better than React hooks because Vue hooks are smarter (they don't require you to specify dependencies) and Vue hooks doesn't have the same limitations on the placement of your hooks as React hooks. However, React has better Typescript support than Vue. I would write a package in React and Vue, and Vue seldomly gives me Typescript errors for the same mistakes I made in React. Also, I hate having to use Vue Props validation when using Typescript because it takes away the Typescript support. I would rather create a type or an interface and pass that into my props rather than having a return type of a function of an array of types. While it is easier to install packages into Vue, React has more 3rd party libraries like React Query, React Relay and etc. There were some instances where I have to install React into my Vue project in order for a 3rd party library to work. One thing I wish Vue is not having to add an imported component in the components object. It is redundant. Svelte solved that problem and I hope Vue will too one day.
Hi Erik, thanks for the video and today i subscribed to your channel. To start a vue app you do not need a cli but for react you always need a build step to use react + JSX. I love Vue because have directives like Angular, for small projects is perfect and you can separate css, js and html like Angular, in different files. React just over complicate things and it is like a hamburger. Please do a similar pokemon app with SVELTE and ANGULAR. Even better will be with EmberJS Octane version. ;)
I don't know why people ignoring subscribing this channel. Erik, I think, best explains the Vue.js, Vue Plugins other than telling like "Why I left my job as FAANG developer" or short videos that only introduce languages/frameworks and so on. Subscribe him to make such a talent popular!!!
@@ProgramWithErik can you make a poll to review the projects built with Vue.js and based on it make a youtube video? That would be awesome and interesting.
So, almost all in react app is ok. But you completely misunderstood useMemo indeed it is like computed value in vue. It RETURNS computed value so you don't need extra state for filtered pokemons it will be like so: const filteredPokemons = useMemo(() => pokemons.filter(() => /* do awesome predicate here */), [pokemons] ) Code you put in useMemo in react world is used as useEffect hook but if it is silmple transform like in this app we use useMemo like I write before.
You're still kinda misusing the useMemo hook, aren't you? I thought you are supposed to store the value from useMemo. I've never seen anyone use useMemo like you did in this video. const value = useMemo(() => ...
What about the support?? I think react has a large community compared to Vue. But the point you actually don't need much help in using Vue as it so simple. So EOD Vue>>>>React
Actually, you're calling useMemo the wrong way. The right way to execute a function whenever a value changes is by calling useEffect (with this, you can also return a cleanup function). useEffect is the React equivalent of watchEffect. useMemo is the React equivalent of computed in Vue, except it takes a second argument that is basically everything you used in the factory function because React doesn't track these variables. You need to specify this boilerplate every time. So, the proper way to useMemo is just const variable = useMemo(factoryFunction, deps);
Thanks, I wanted to use useMemo to match the functionality with compouted properties in Vue. Where if any value changes, like the text in the input, it gets recalculated. I suppose I could have used useEffect instead, and it have worked the same. But I wanted to demonstrate that useMemo, per KCD, could be used to help when you have something that is computationally intensive.
React should win the routing part. You can define a config file with routes the same way as vue does. And dynamic imports are a Webpack feature, which means they do work in react as well, even without React.lazy.
@@ProgramWithErik Well, to be fair, you do have to create a small wrapper component in react to wait for the import to load, if you don't use React.lazy.. I am just disappointed react loses all of the points 🤣 and can't even argue anything else. Vue just seems better.
how I choose my framework, I check if I could atleast develop or demo my app to my typical user's computer ( dual cores, DDR3 4gb ram) . it it could run there then that's my frameworks. angular always fails. vue is little sluggish. react atleast runs. but I prefer vue over react by all my clients want the stack Facebook and Instagram developed.
Vue is great but if you want to develop mobile apps with react native or flutter I think react is Best choice because flutter is inspired by react I guess
A vue fun comes and compares vue vs react, who wins???? Do you still expect react wins? Btw; react has the largest community and i love it because of its concept=> write js whereever you want!
That’s a good thing. If you have a large team working on one project it’s great if everyone can adhere to one style so that anyone new can pick it up easily
@@CodingAbroad Vue's options api structure is not optimal for building large components. therefore I'd argue it is not as optimal for building larger projects comparing to react/angular. The composition API is also a move into the wrong direction. tbh I personally like it, but it will undoubtedly alienate half of the existing community like angular did in the past.
If Svelte manages to mature, it will blow Vue to oblivion. Vue 2 was great,Vue 3 makes things very convoluted with many principal ways to do the same thing, plus shitty TS support. React is a little more syntactically dirty, but adoption is much superior and the ecosystem of tooling lets you create pretty awesome stuff quickly. Next is also vastly superior than Nuxt. Plus React+Markdown makes things a bit easier. There's a lot of flexibility.
I am working in react typescript redux right now and I hate it!!! I just want to make an Ajax request and I have to visit 4 files to do it!!!!! Long live vue
I like your vedios on vues but you are totally baised towards vue react and next js are much better than vue I have worked on next js for year and working on vue for 6 months next is still better than vue
used react, moved to vue 4 years ago. I swear react has become even more of a dumpster fire. It sets the barrier for entry to high by requiring such a high level of Javascript knowledge. Vue is soo friendly.