Live data from Hacker News

What I wish I knew about React

bitsofco.de

261–270 of 301 posts

Re: What I wish I knew about React

#261
post #241

Earlier quoted context omitted.

That is true, but it not just the lack the humor, it is the pretentiousness and the faux-politeness.

It's an elitist mirror to 4chan's edgelord culture in many ways.

if only, for all their sins (which are lots) 4chan is a very fascinating place. The other day I was fantasizing (lol) about giving a talk to out-of-touch academics/journalist boomers and explaining them the 4chan phenomenon.

There are lot of very smart people there. You compare the recommendations in music/books/cinema between them and reddit and it is "People" vs "Cahiers du Cinema".They tend to create lots of Internet culture, the humor is caustic but it can touch genius from time to time and they are very open regarding topics like sexuality,depression, economics and so on.It is proof there is always more that meet the eye.

Re: What I wish I knew about React

#262
post #244

Earlier quoted context omitted.

Can you clarify on that last point a bit? Not that I extend React.Component these days, but far as I'm aware, the only "gotcha" of React.Component (vs other classes in JS) is that they shouldn't be extended. I guess, yes, there's different semantics between the constructor and componentDidMount, but it's UI library, this is common that "when a constructor is call there is no guarantee the component has actually mount…

Sure, what I mean is you'd never use a React.Component like you would a class in Java or another OO language. You never instantiate it, pass instances of it around, or call any of its public methods. It serves just as a container for some functions and provides a binding for `this`. Dealing with `this` caused things like componentWillRecieveProps to be buggy so hooks allow you to use a function as the container and r…

Actually, you can pass instances of it around just fine, if you know how it works. It’s not any different than a view subclass on Android, or a widget in Qt.

Re: What I wish I knew about React

#263
post #193

Earlier quoted context omitted.

If you're coming from Reddit, Imgur or YouTube it seems like hate, but I've found it's simply a lack of humor... Any jokes, memes or puns are frowned upon the community 99% of the time. I suppose it's considered redundant or not-constructive...

That's only because 99% of jokes aren't as good as people thought they were when they pushed the submit button. HN has a great sense of humor. I know this of course because my jokes have been upvoted.

Most jokes I see are downvoted and I can't recall seeing a single joke comment. That's not to say there zero humor here, just much much less than other less serious discussion forums.

Re: What I wish I knew about React

#264
post #193

Earlier quoted context omitted.

If you're coming from Reddit, Imgur or YouTube it seems like hate, but I've found it's simply a lack of humor... Any jokes, memes or puns are frowned upon the community 99% of the time. I suppose it's considered redundant or not-constructive...

That is true, but it not just the lack the humor, it is the pretentiousness and the faux-politeness.

Well being nice and polite is part of the guidelines here, which is not such a bad thing.

But the pretentiousness annoys me sometimes, at the end of the day it's another forum of people who don't think they're part of a hive-mind... which we definitely are

Re: What I wish I knew about React

#265

Earlier quoted context omitted.

React introduced a whole new way of writing GUI's. I come from a game development background, and there we had Immediate GUI's for some time now ( https://eliasdaler.wordpress.com/2016/05/31/imgui-sfml-tutor... ). React basically translates this concept to the web, and does some optimizations to not rebuild the entire DOM from scratch, and only rebuild when state changes and not every frame. Writing a 'render functio…

> React introduced a whole new way What will happen to this way when React is "outroduced" ?

Flutter uses the same concept, and it probably won't be the last. But who knows, things go really fast in the web world.

Re: What I wish I knew about React

#266
post #199

Earlier quoted context omitted.

React introduced this concept ‘to you’ perhaps but it wasn’t the first. The framework I used has been doing this in the very early 2000s. Don’t get me wrong it has a lot to like about it - but the only revolution is that Facebook’s might propelled this in the minds of developers all over.

Just curious, which framework are you referring to? Every time I see someone claim such a thing, it's usually only distantly related. Like it too has a render() function. I mean, you can find old FRP phd/whitepapers but I don't think they prohibit you from ever saying "$X introduced $concept" without a disclaimer that it wasn't the first. So if you're going to insist, then why not share some prior art for the discuss…

I started my career in 2002 (been programming since '93), and back then there was no client side rendering. So my guess is, he's talking about server side rendering that spits out html.

Since those things really miss the 'react' part of React, it is still quite different.

Re: What I wish I knew about React

#267
post #244

Earlier quoted context omitted.

Sure, what I mean is you'd never use a React.Component like you would a class in Java or another OO language. You never instantiate it, pass instances of it around, or call any of its public methods. It serves just as a container for some functions and provides a binding for `this`. Dealing with `this` caused things like componentWillRecieveProps to be buggy so hooks allow you to use a function as the container and r…

Actually, you can pass instances of it around just fine, if you know how it works. It’s not any different than a view subclass on Android, or a widget in Qt.

Instantiating it does nothing useful, though. `React.Component` is basically an empty shell with a marker flag on it so that the React renderer recognizes it, and the `setState` method just delegates to the actual renderer implementation. There's no reason to ever instantiate it yourself.

Re: What I wish I knew about React

#268

Earlier quoted context omitted.

The JS is run in a separate thread because the real-time operations are meant to be handled fully native. If you are constantly passing large amounts of data between the JS thread and the Native thread or constantly changing the layout (which passes data between the threads) you are doing it wrong. You can't code it like a web app where you just replace one large node tree with another if you want it to be instant, y…

> If you are constantly passing large amounts of data between the JS thread and the Native thread or constantly changing the layout (which passes data between the threads) you are doing it wrong. I’m working on an alternative to React Native that does exactly this, and it works absolutely fine: React NativeScript. In NativeScript (and thus also React NativeScript), the JS logic and the UI both execute on the UI threa…

Sweet, no more bridge bandwidth issues. I'll check it out.

Re: What I wish I knew about React

#269
post #264

Earlier quoted context omitted.

That is true, but it not just the lack the humor, it is the pretentiousness and the faux-politeness.

Well being nice and polite is part of the guidelines here, which is not such a bad thing. But the pretentiousness annoys me sometimes, at the end of the day it's another forum of people who don't think they're part of a hive-mind... which we definitely are

Being nice is great, being fake-nice is not, sometimes politeness is a facade to hide passive-aggressiveness and up-you-up-manship.

HN readership is as establishment and conventional as it goes, it is the "study hard for the SAT/GRE/GMAT" crowd.

Re: What I wish I knew about React

#270

Earlier quoted context omitted.

You can, of course, do the same with React: https://reactjs.org/docs/add-react-to-a-website.html

But if one would lile to write in jsx, which is the default in react, the doc still guide you to use a preprocessor for production.

Exactly. I can still use jQuery too, but the whole selling point of React is its heavy reliance on JSX.
Post reply on HN