Usage of React and Svelte is growing, Vue is trending down
https://2022.stateofjs.com/en-US/libraries/front-end-frameworks/
Please click the "Usage" tab. Is this related to the Vue 3.0 release and the introduction of additional API?
https://2022.stateofjs.com/en-US/libraries/front-end-frameworks/
Please click the "Usage" tab. Is this related to the Vue 3.0 release and the introduction of additional API?
Outside of that network effect, I'm completely and utterly baffled by React's popularity. It's the most counterintuitive framework I've ever used. Things like the `useEffect` dependency arrays and the general naming of hooks seems to lack any thought. That said, Next.js and Vercel are excellent and probably responsible for Gatsby's precipitous fall.
Unfortunately I felt that Vue's switch to the composition API was poorly handled and have found myself frustrated trying to figure out how to migrate to it, so I'm not hugely surprised by its descent.
I'm interested in trying Svelte but wary of investing time in yet another framework, having been through Angular, Ember, React, Vue and all of the tooling that goes with each of them.
This is why it was so disheartening to me to see Qwik try and emulate React in many respects: one of more interesting framework and performance concepts in a while, and they had to go and make it look and feel React-like. Blah.
For what it's worth, I have not tried all JS frameworks, but I think Svelte and Mithril have the best developer experiences of those I've tried.
In React, everything rerenders newly in response to state changes. All functions are called on each render. Side effects need to be limited so that they aren't called on every render. The dependency array is where you say "only perform the side effect in response to changes to these specific values".
The problem is that most people aren't used to React's functionalish programming model. It's really common to have way too much state in a React app, and then rely on useEffect to manage that state. If your useEffect isn't reaching outside your React app in some way, it probably represents a flaw in the way you've structured everything.
I actually think that this is another place where its popularity gets in the way: there are so many low quality blog posts clogging up the search results, making it difficult to find any wisdom on the subject.