Live data from Hacker News

React Makes You Sad?

github.com

201–210 of 211 posts

Re: React Makes You Sad?

#201

Earlier quoted context omitted.

The result of me doing the same thing is here: https://github.com/edwardmsmith/react-starter I didn't find the webpack stuff to be too overwhelming, and split dev and prod into two webpack files. `npm start` to start the dev server and `npm deploy` for a production build. The production build produces two files - a vendor file that contains vendor code, and a client file that contains custom code. It probably contain…

That looks perfect! Does it minify/concat? I will dive deeper this evening in any case. Thanks!

Yes, when you run Webpack with the -p (production) flag, as I do in the `deploy`, it minimizes the output:

https://github.com/webpack/docs/wiki/optimization

Re: React Makes You Sad?

#202
post #150

Earlier quoted context omitted.

Did anyone claim the same about jQuery a few years ago? First people claim about js library fatigue, now we are complaining about there only being "one employable js library."

Vanilla JS was so horrible when JQuery came out that pretty much everyone loved it, except for a few folks who had been early adopters of Prototype/Mootools/YUI/Ext and were decrying how JQuery didn't have their favorite pet utility function. I think the JS fatigue we're seeing is because web development is now largely a mature industry. React is roughly the 4th generation of Javascript technologies (1st = DHTML/Laye…

Web development has reached "maturity"... How funny a thought us that.

Sorry to be brutal but. Fuck no it's not. An hours studying of the JavaScript ecosystem should be more than enough for most to see that not only is web development not mature its mutating and beginning to try to consume other programming disciplines like some form of cancer. Just look at how NodeJS has been creeping its way from server to desktop to mobile.

Re: React Makes You Sad?

#203
post #35

As someone who was almost immediately made happy by React, ES6, Redux, and boilerplates, I'm not the target audience. But I feel like this would make me un-sad if I felt overwhelmed by all the choices. I think the Redux guide itself ( http://redux.js.org/ ) also does a fantastic job of a very gradual release into complexity. I recommend that anyone who feels they may want a Flux-like store read through the whole guid…

Also, the free "Getting Started with Redux" video course: https://egghead.io/series/getting-started-with-redux The approach taken in the videos is great because it starts off with implementing your own simplified version of Redux and builds on that. There are no "magic" steps, this makes it much easier to develop an understanding of how it works.

Just want to say a big thanks for recommending this. It's the best introduction to Redux I've found so far.

Re: React Makes You Sad?

#204
post #173

Earlier quoted context omitted.

Just tested it and didn't find it super bad, but I am honestly (negatively) surprised. It does indeed lag quite a bit and feels very unnatural. Chrome here as well. I use React quite a bit myself and haven't experienced this in my own apps. Odd! There's also a slightly annoying flicker when you type the last bit and it keeps returning the same movies.

The slow text input problem is probably because they're updating their redux or flux store on every keypress.

Something like that certainly plays it's role. I'm doing that as well for certain inputs and experience no lag at all, so it depends more on their implementation of the store. I think their search store is probably doing a lot more than mine (although, entering text, querying an API, processing response async). It seems like they could introduce some optimizations there.

Re: React Makes You Sad?

#205

Earlier quoted context omitted.

I lol'd the minute I saw the flow chart. It's absurd. Helpful and well-intentioned, but absurd.

Thank you for the criticism! Would you like to help me understand its flaws better so I can improve in the future?

Dan: I did not mean to offend, truly. As someone who has been working in this field for only ~ 2 years, it's just still kinda surprising to see such a thing. I wasn't sure at first if it was serious.

But I also understand the reality of our field, where such things are very serious, and yet always verging on self-parody. I'm getting used to it.

Re: React Makes You Sad?

#206

I wish I saw this a couple weeks earlier, before I gave up on React-Redux. Its documentation and Dan's talks work well for isolated samples, but I had no luck building a larger system that binds all the pieces together. There is no definitive documentation source (like msdn or angular docs) and every tutorial and guide came with its own massive set of boilerplates and libraries. These libraries did not have good docu…

Mind expanding on specific challenges? We’re happy to hear your input at https://productpains.com/product/redux/.

Re: React Makes You Sad?

#207

I really like React, but I have to admit, that I don't write big apps with it (yet). There is one thing though which I find results in subtil bugs (entirely my fault): When one input is changing and depending on that input another output value has to change than the input shouldn't change state yet and the output should be computed from input (+ state where necessary). Only then you should set the state. Do not set t…

If you’re saying that `this.state` doesn’t update immediately after `this.setState` so you can‘t use the previous value, one way to get around this is to use `this.setState` overload that takes a function:

    this.setState(prevState => ({ prevState.count + 1 }))
This way all the changes will be stacked on top of each other correctly.

Re: React Makes You Sad?

#208

Earlier quoted context omitted.

Thank you for the criticism! Would you like to help me understand its flaws better so I can improve in the future?

Dan: I did not mean to offend, truly. As someone who has been working in this field for only ~ 2 years, it's just still kinda surprising to see such a thing. I wasn't sure at first if it was serious. But I also understand the reality of our field, where such things are very serious, and yet always verging on self-parody. I'm getting used to it.

I talk to a lot of people on Twitter and I see real people turned off from React because they saw complicated boilerplate projects and assumed all of this is necessary just to get started. I’m just trying to counter the misinformation.

Re: React Makes You Sad?

#209

Earlier quoted context omitted.

Dan: I did not mean to offend, truly. As someone who has been working in this field for only ~ 2 years, it's just still kinda surprising to see such a thing. I wasn't sure at first if it was serious. But I also understand the reality of our field, where such things are very serious, and yet always verging on self-parody. I'm getting used to it.

I talk to a lot of people on Twitter and I see real people turned off from React because they saw complicated boilerplate projects and assumed all of this is necessary just to get started. I’m just trying to counter the misinformation.

I totally get it. And it's a needed effort. I think I just didn't type my response politely enough.

Re: React Makes You Sad?

#210
post #198

I want to start using React but I think I'm going to stick with Angular for now. I have all of the gotchas of Angular figured out and I think I want to wait another year for the dust to settle on React. By looking at the flowchart it looks like the React ecosystem is still quite Alpha and learning to grow up.

As someone who came from angular, if your app is going to get large react is far better than angular. For small pages / forms angular is in the sweet spot, so it depends on how your application is setup (not to say you can't do large apps.. but performance is harder in angular)

Looking to use react because of code cleanliness. Never had a performance problem with angular and have done two apps large apps thus far. I feel like people who have performance problems are just putting too much html on the page, and should rethink their design and rendering philosophy.
Post reply on HN