Most devs I know start a react application by cloning some standard git repo which has a working webpack/tidyCSS/redux/some test suite etc. and then write your first line of useful code. The boilerplate is enormous!
As for build systems vs. script includes... I think Vue is probably being used in a lot more hobby projects than npm downloads would seem to indicate...but using a build system is a stronger indicator of a professional web app and pretty much necessary for any non-trivial project.
<div id='root'></div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.38/browser.min.js'></script>
<script type='text/babel'>
const App = () => <div>Hello World</div>;
ReactDOM.render(<App />, document.getElementById('root'))
</script> elem.div(elem(Component, {prop: 'value'}), {className: 'foo'})
It's surprisingly common, and it's listed not too far down on the React installation page:Edit: more information: https://github.com/babel/babel-standalone/blob/master/README...
It's /really/ not intended for use in prod.
.
Edit. I kinda sent off on a stream of conciseness about reactjs.net here, feel free to ignore this bit.... :D
Infact, as well made as it is and despite using reactjs.net heavily for the last couple of years, the only time i would be inclined to use it on a new app is to leverage the universal rendering, or if your react app is just freaking massive and takes forever to run a build - otherwise you may aswell just throw everything at webpack --watch via iisnode or regular 'ole vanilla node.
Then again we had to make a bunch of changes to the package itself to fully support our bundling (we don't like cassette so we made our own) and to support multiple server-side bundles, none of which are agnostic enough to warrant a PR, so upgrading reactjs.net to a more recent version is a hassle, making me slightly biased against using it ;)
edit: looks like angular had 1 million downloads last month and @angular/core 1.7M.
It can be deceptive when you look at charts that list totals when what you're concerned with is growth rate.
A more accurate narrative would be that Vue is eating the dying Angular.
https://en.wikipedia.org/wiki/Usage_share_of_web_browsers#W3...
Which one do you use now?
I remember that when Larry Page granted the Founder's Award to Chrome, there were several TGIF questions saying "Isn't it premature? Chrome's market share is only 5%, and the vast majority of web users have barely even heard of it."
Larry's response was "In my mind, Chrome has already won," and in hindsight, this is probably what he was referring to. When a large number of users are flooding into a brand new product, even though there's already an alternative that's pretty good on the market and still growing, that usually means that the new product fills some burning need or deficiency that existing alternatives don't. That comparison will continue to hold unless competitors address it. That's why investors look so heavily at growth rates: if you're growing 15x faster than your competitors, you're probably going to end up with the whole market, given enough time.
I literally remember standing there listening a microsoft rep tell me that 'When you don't have much market share, there's always room for great growth".
...just saying, you can spin the story however you like, but the fact is that Vue currently has a reasonably insignificant market share.
Beyond that, all we can do is speculate.
Sound familiar? (and I assure you, that 3.6% is a whole lot more than a 135k measly installs a day).
:P
That's called 'unsustainable small scale growth'; and it's what you're seeing with vue right now.
A good year over year growth of 2 or 3% is far far far more compelling than a tiny 100% growth rate from nothing to nothing.
Look at chrome's history of growth and that's what you'll see. In fact, if you look at the long term history of all three, that's what you'll see with reacts growth as well: https://npm-stat.com/charts.html?package=react&package=vue&p...
Sure, maybe vue and windows phone are different beasts and they're difficult to compare... but the comparison to chrome makes zero sense either at this point.
This '100% growth' stuff is pure hand waving nonsense. Its obviously unsustainable.
The question is, can vue turn its current trend into a sustainable consistent growth and take on react? I dunno, but I can guarantee you the answer to that question is something that no one knows at this point.
That may not be a true leading indicator of adoption, but it is hard to argue it isn't an indicator of increased interest.
See https://npm-stat.com/charts.html?package=react&package=vue&p...
Otherwise we would all be still using PHP instead of Python or Ruby.
React was in the same spot a few years ago. It went from a dark horse to the default over the past two years.
I see React and Vue as tools for scratching very specific itches: fast DOM manipulations and databinding that actually works. React was this, then it grew and grew and grew. Vue is threatening to move away from this.
Also, still pissed that my year-and-a-half old react code is now hopelessly out of date, and requires updating (guess what, I'll be porting it to vue instead). That is bullshit.
If you want to use React with Rails, use Rails in API mode and keep the front-end separate. I'm not sure how rewriting in Vue is going to solve any of your problems at all.
"The browser loads scripts, why can't that be enough?"
Not sure what you mean by this. Whatever you use, the browser will be loading scripts.
Vue doesn't require nodejs to follow along with the examples
Vue doesn't prescribe to me how I should write my markup (beyond Angular-style attributes) or force me to violate separation-of-concerns.
Vue doesn't require it's stuff to be stored in $ROOT/app/assets/javascript/components, when all the rest of my code lives in $ROOT/app/whatever
Vue doesn't (or didn't) prescribe all these stupid little companion addons to do things I learned how to do (and do better) years ago
Vue doesn't give me a shitty markup language (JSX -- class vs className? Fuck off!) or even worse alternatives (its super verbose JS-DOM alternative) if I don't want (or can't) use it
Vue doesn't have nearly as large of an obnoxious, inexperienced, harebrained, and cloud-huffing crowd that will argue with me when I express distaste in it
Personal insults aren't cool.
Vue.js might be better than React in some ways, but is it enough of a paradigm shift to throw away a bunch of hard earned knowledge?
Just like Github stars arent representative because only (active) Github users would add a star and when a project has critical mass, the amount of actual users will no longer correlate to the amount of stars.
Anyway, I don't think there is a good way to measure usage or popularity of these frameworks. Maybe Google Trends or stackoverflow tags? I don't know really.
Stackoverflow tags comparison here: http://imgur.com/a/O3mSB
The tool used is here: http://data.stackexchange.com/stackoverflow/query/201360/que...
I felt happy looking at this. Angular has everything (the complete package of router, speed, and all the components you need), and was surprised why react was more popular
Google trends is more useful.
just ask any ex-angular devs.
I grabbed a point around the middle and one near the end. React: 642K > 1,184K. Vue: 53K > 155K
A funny pattern that emerges in the above chart is that downloads drop sharply on weekends. I have seen packages that exhibit the opposite pattern (downloads spike on weekends). And this pattern is correlated with popularity, the most popular packages are downloaded largely by 9-5 industry coders, and mostly via continuous integration bots.
https://insights.stackoverflow.com/trends?tags=angular%2Crea...
https://www.hntrends.com/2017/july.html?compare1=React&compa...
Hiring is a lagging indicator, but I see React hitting a plateau the way angular did. I see Vue is on the cusp of takeoff. Time will tell if it fails to launch, but I'm seeing more interest in Vue at meetups than React.
I think a lot of this has more to do with React's state management than licensing. One of the react developers said it best. Paraphrasing;
Everyone stopped saying React is fun after Redux.
From my understanding managing state is a fundamentally hard problem, and Redux just make it very explicit and avoid the confusion of a state living in multiple places.
Did not try Vue but is the state management simpler?
react-redux, which is neither redux nor the only way to integrate redux with react, is a bit more complicated but still not very complicated.
https://npm-stat.com/charts.html?package=react&package=vue&p...
In reality, React is downloaded roughly 4-5x more than angular and 7-8x more than Vue. In August so far, React has 75% market share among these three libs. Interestingly, this share has grown in August compared to both last month (July) and beginning of year (January).
While this thread and the license thread might indicate that React is dying, it's not. It's growing.
If Vue is going to be what React is today, it has quite a long way to go.