Hacker News new | ask | show | jobs
by giantsloth 3147 days ago
I implore you to checkout create-react-app to get a hello world really quick:

https://github.com/facebookincubator/create-react-app

  npm install -g create-react-app

  create-react-app my-app
  cd my-app/
  npm start
Your sentiment is correct that tooling around these pieces of technology needs to always be first class. React failed miserably, and Vue did an AMAZING job.

I'm probably starting to sound like a shill for React. I've used both and love both. I do like that React is "just javascript", which I think is why I use it.

3 comments

I used that. I took me a huge time just to understand what all the tooling was doing, how to integrate it in my current stack and how it was going to affect my current project.

My pet peeve with react is that I can't just code. I have to stop every 10 steps and reflect on the tool I use, instead of the problem I'm trying to solve.

I have no idea what you are talking about. React doesn't require any tooling. Drop a reference to React from some cdn in your HTML file and you are good to go. People confuse the myriad of libraries and tools complementary to React for React. You don't need create react app for Hello world.

Create React App gives you a zero configuration way to not only write hello world, but also bootstrap a non-trivial production ready application. In the company I work for, we were previously using JSPM/SystemJS/Gulp. We replaced all of that with create-react-app. It allows you to very easily bootstrap existing applications on top of it: http://fredrik.anderzon.se/2016/12/04/adding-create-react-ap...

And if you want full control of your project, you can "eject" and CRA will generate the webpack configuration file being used so that you can tweak to your heart's content.

I use React daily, and the whole experience has been extremely pleasant.

The point is about not using external builds of react, but trying to understand what every piece does.

That means you want to be able to understand it well enough to write the webpack required for a react pack from memory.

And with react, that's years of learning.

> My pet peeve with react is that I can't just code. I have to stop every 10 steps and reflect on the tool I use, instead of the problem I'm trying to solve.

Thank you! Every time I've tried react (and enough attempts were made to finally decide it was just not for me), there was always something in the back of my mind that I didn't like and I just couldn't put it to words. You just described what it was.

And, if one forgoes tooling, then the situation is like the one you described in your previous comment: an afternoon just to get a "Hello world".

What do you mean by “React failed miserably”?
React is the new JQuery, I really don't see Vue and Angular being in the same world as React.
As far as the actual libraries themselves go, if any of Vue/Angular/React are the new jQuery, it's Vue. It's the smallest of the three, but more importantly it's the easiest of the three to drop into a page without any tooling.
I have a hard time understanding why this "drop in" experience is so important. Are you all writing simple contact us forms or something incredibly simple?

Any application that I've built which actually required a technology like Vue or React was a significant undertaking and a few hours getting up and going (not that either of them require anywhere close to that) is nothing.

I don't see how jQuery could have been anywhere near as ubiquitous if it had required a build step.

It makes experimenting easier for beginners, for people considering switching to it, for people who are already using it and want to try something outside the context of their existing codebase, for people writing tutorials and demos, etc.

The less bullshit to wade through when using a tool, the more situations it will be applicable to, regardless of skill level or project size.

That's just it though, Vue & React aren't for most web sites. There is no point in pulling either in unless you are building something much more complex than where jQuery would suffice. There is no need for a technology to be "ubiquitous", just that it is going to meet the demands your application has for it.
Actually vue is so small and simple you can just drop it anywhere. Even on non JS heavy website. It's a bit like redis. Low price. Always nice to have. Very reliable.
First, as a learning experience it's easier. In the HN bubble it's easy to forget most web project out there don't even have npm installed. I regularly train dev that just learn what ajax means.

Secondly, a lot of my projects just don't need anything else. If i have a 2 weeks contract with a client, i'm not going to setup webpack, a ci server and docker.

Having the choice to scale up or down is an amazing feature.

So, pretty soon we should see youdonotneedreact.com websites popping up?
Once web components become standardized.

So...2030.

React is opinionated document.write
Well... there is a good chance that you don't.