Live data from Hacker News

React Tutorial: Cloning Yelp

fullstackreact.com

241–250 of 258 posts

Re: React Tutorial: Cloning Yelp

#241
post #229

Earlier quoted context omitted.

Grunt is actually not still fine to use. I've been burnt by a lot of plugins coming out for Gulp only and now for webpack only. What the GP says is true: if you start using any of these JS tools prepare to switch them out every 6 months.

Maybe I'm not ahead of the curve enough. Still though, every 6 months? Did you start using Grunt only 6 months before running into this issue? Maybe I'm reading this too literally, but personally I'm totally cool with using a tool for 2 years and then transitioning to another. 2 years is already a lot of good value.

My experience is that the decision to switch is often being made for you. I was perfectly happy with Grunt until some plugin maintainers didn't update the Grunt version and only worked on Gulp.

Re: React Tutorial: Cloning Yelp

#242

Earlier quoted context omitted.

I wouldn't put lodash or immutible-js right away, and may gear towards axios as a client communication library. The reason there's so much to do, is there are so many options... core parts of the tooling for modern js are fairly consistent... node is pretty much required, which brings npm.. understanding CJS and ES6 module syntax also required... a translator (babel|typescript|traceur) are pretty much required, as is…

I can't recommend Immutable.js enough though, especially as your Redux state object.

I agree it's useful... however, it's far from a requirement if you're using React+Redux. Though there are some workflow changes if you are using Immutable.js with Redux. It's also the size (min+gz) of preact + redux combined. While still relatively small, depending on your needs it all adds up, and it really should depend on one's specific needs.

Re: React Tutorial: Cloning Yelp

#243

Earlier quoted context omitted.

When I see people in other teams fighting with Maven, Jenkins builds for weeks somehow I cannot believe this.

I didn't say that Maven wasn't complex. I said there are fewer tools and less churn. The advantage of Java dev is that you can justify the intellectual investment in the tools because there are fewer of them and they are going to be around for a long time. The same cannot be said about client-side development at this time.

Grunt still exists, npm has been a common point for close to half a decade now... it's pretty solid... everything else builds from there. If you've gotten used to npm and cjs modules, that's been very consistent for a number of years now.

Re: React Tutorial: Cloning Yelp

#244

Earlier quoted context omitted.

By the same note, you likely won't be writing a complex desktop application without some tooling installed, with similar pre-requisites. I don't know why people get so irritated at "JS tooling is hard". Try writing an (INSERT FRAMEWORK HERE) app outside the browser. People assume that writing an APPLICATION for a browser is easy , which is why people get stuck maintaining monstrosities that are disorganized, not comp…

> you likely won't be writing a complex desktop application without some tooling installed With C++ I can just download Visual Studio, or the Qt SDK. No other dependencies. With Go, I download Go (a single installer) and also my Go IDE of choice - LiteIDE (a single zip). I don't have to install an installer installer or any nonsense like that.

And go doesn't have a package manager? It doesn't need any other modules to create gui apps? Aren't there wrapper bindings that would be simpler than direct api calls?

Re: React Tutorial: Cloning Yelp

#245
post #40

Great work on the tutorial. I'm sure it took a lot of time to setup, and it seems well written. However I simply won't believe that setting up a simple React app requires so much overhead. Granted, I have no experience with React, and only marginal experience with frontend web dev. As I read the tutorial, this is the list of questions I had: 1. Why do we need so many Babel presets? What do they do? 2. Why do we need…

This is how I start off a React app: $ npm install --save react react-dom $ npm install --save-dev webpack webpack-dev-server babel-core babel-preset-es2015 babel-preset-react react-addons-test-utils /webpack.config.js module.exports = { entry: 'src/index.js', output: 'dist/bundle.js', module: { loaders: [{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel', query: { presets: ['es2015', 'react'] } }] } } /src/…

Nifty! The config needed some fixes and tweaks (using `babel-loader`, ``, a `resolve` section) before it actually works out of the box, but it's a nice idea. I made a `git clone`:able version of the setup with fixes and a `Makefile` at https://github.com/johan/make-react-hack

Re: React Tutorial: Cloning Yelp

#246

Earlier quoted context omitted.

By the same note, you likely won't be writing a complex desktop application without some tooling installed, with similar pre-requisites. I don't know why people get so irritated at "JS tooling is hard". Try writing an (INSERT FRAMEWORK HERE) app outside the browser. People assume that writing an APPLICATION for a browser is easy , which is why people get stuck maintaining monstrosities that are disorganized, not comp…

This is why I like Ember: you get setup in 2 seconds. Sure, I don't like all of the decisions they've made in the framework but it does work really well out of the box. I think having a cli will become standard for JS frameworks. You just need to have the batteries included to capture the newb mindshare.

I've recently started looking into Ember - which of their framework decisions do you dislike?

Re: React Tutorial: Cloning Yelp

#247
post #194

Earlier quoted context omitted.

Out of curiosity, why did you write the function like this: const MyRootComponent = (props) => { When it's shorter and more obvious what's happening if you write them like this: function MyRootComponent(props) {

"An arrow function expression has a shorter syntax compared to function expressions and lexically binds the this value (does not bind its own this, arguments, super, or new.target). Arrow functions are always anonymous." https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

In this case: You're potentially closing over node's "this inside of module body === exports" which seems more confusing than helpful..?

Re: React Tutorial: Cloning Yelp

#248

Earlier quoted context omitted.

I didn't say that Maven wasn't complex. I said there are fewer tools and less churn. The advantage of Java dev is that you can justify the intellectual investment in the tools because there are fewer of them and they are going to be around for a long time. The same cannot be said about client-side development at this time.

Grunt still exists, npm has been a common point for close to half a decade now... it's pretty solid... everything else builds from there. If you've gotten used to npm and cjs modules, that's been very consistent for a number of years now.

Would you use Grunt for new projects? Maven is still being actively used.

Re: React Tutorial: Cloning Yelp

#249

Earlier quoted context omitted.

> you likely won't be writing a complex desktop application without some tooling installed With C++ I can just download Visual Studio, or the Qt SDK. No other dependencies. With Go, I download Go (a single installer) and also my Go IDE of choice - LiteIDE (a single zip). I don't have to install an installer installer or any nonsense like that.

And go doesn't have a package manager? It doesn't need any other modules to create gui apps? Aren't there wrapper bindings that would be simpler than direct api calls?

Speaking for myself, I have used many platforms ranging from embedded to desktop and I also proud myself to be a competent old skool web developer - one who has avoided node.js, angular, amber and similar. React caught my attention and I tried to learn using it... What pain! What parent is saying about tooling is totally true. But maybe I just missed a simple hello world tutorial... I will check it out in a year or so, if it's still around by then.

Re: React Tutorial: Cloning Yelp

#250
post #152

Earlier quoted context omitted.

Yeah so it's really not very simple.

Well yeah, it's not really an apples to apples comparison. A Yelp clone written in React lacks user auth, persistence, and admin.

And you will be able to use the same python tools for years to come. Good luck with JS frameworks there!
Post reply on HN