Earlier quoted context omitted.
I love React and write it, in Typescript, on a daily basis. However: - It starts you off with about 40kB of minified gzipped javascript; some developers feel that it's too much. - It is not and probably never will be the most performant framework out there, which upsets quite a few people (although the work that the React core team is doing with Concurrent Mode probably means that from the end user's perspective Reac…
Your last point is a cause of some apprehension for me. In the team I'm currently working with one of my coworkers calls himself a React Developer, and my experience has been that anytime an issue arises that may not be specific to React, this person's ability to problem solve significantly diminishes. I've seen it in a couple of other individuals as well, and I feel it's becoming more widespread, though I hope I'm w…
What I wish I knew about React
211–220 of 301 posts
Re: What I wish I knew about React
#212Re: What I wish I knew about React
#213Earlier quoted context omitted.
I've been considering the jump into TS, but I don't want to end up in a coffeescript situation (i.e. language is dead, but code lingers on and has to be converted back to JS at some point, rather painfully). Do you think it's worth it?
Unlike coffeescript which had a fundamentally different syntax, typescript is just modern javascript plus types.
You have to be aware these features would need to be manually converted back to JS were you ever to switch back. Honestly this would likely not be a significant amount of work, especially if you don't overuse them, but just to make you (GP) aware.
Re: What I wish I knew about React
#214Earlier quoted context omitted.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... > JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented inheritance model to JavaScript. You've been tricked into thinking you're using a class, but you're really not. I understand it's a useful trick, but hooks a…
I disagree. I think that's like saying C++ doesn't actually have classes, it's just syntactic sugar around structs of function pointers. It may be technically correct , but C++ and now JS have a "class" keyword for a reason, and that's to steer you towards organising your code into classes which operate in certain ways. In both languages you can avoid using classes, sure, or abuse classes in various ways. But fundame…
Re: What I wish I knew about React
#215Earlier quoted context omitted.
Yeah but how is that different from any other UI framework? onCreate/onStart/onResume and onComponentDidMount, onPause/onStop/onDestroy and onComponentWillUnmount are basically the same. Be it Android, Swing, or Qt, everywhere it's the same pattern. React is the first framework which actually feels like UI development on the web, not anymore like JS spaghetti. In fact, having internal state, externally given props, e…
I think lifecycle methods in general, no matter what the framework is, are a suboptimal way of doing things. React works quite differently and shoehorning it into a lifecycle thing was holding it back, or at least that's how I feel. YMMV. At least it looks like we agree that React is a decent framework :-) That said, for us devs who do both native and JS code, the condescending part is quite hilarious as well ;-)
It's just funny when pure JS devs go all "no you won't convince me to compile my code / use classes with lifecycles / etc, that's against the natural order!!!"
Re: What I wish I knew about React
#216Earlier quoted context omitted.
Really? I would have put C++ and Java near the top of the “most ridiculed languages” list.
As the old mantra goes, "there are two types of languages, the ones that everyone complains about, and the ones that nobody uses".
When the latter become dominant, there should be even more subsequent, innovative ones.
And the cycle will repeat.
But it's less net shittiness with every generation. And how many generations are we even in so far? C is '70s security gore, C++ is an '80s attempt to force OO memes that we've come to regret onto the '70s security gore, Python and Java are '90s OO memes in earnest, JavaScript and PHP were kludgy mistakes slapped together in a fit of desperate confusion to get some web shit to run, aaand...
Re: What I wish I knew about React
#217Earlier quoted context omitted.
> I am not so up to date with frontend dev but what's with the hate towards React these days? HN is rarely the place to read constructive comments about JavaScript and frontend development. Personally I've been developing web apps for 10 years (with technologies such as Spring, ASP.NET, CakePHP, Symfony, Django, jQuery, Backbone.js, Angular 1) and I quite enjoy React. I think it makes my job easier and I feel product…
I've been considering the jump into TS, but I don't want to end up in a coffeescript situation (i.e. language is dead, but code lingers on and has to be converted back to JS at some point, rather painfully). Do you think it's worth it?
On the other hand Flow is much less cool than TypeScript these days. Plus using it for development under Windows have issues, although FB has started paying attention to them.
Re: What I wish I knew about React
#218Earlier quoted context omitted.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... > JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented inheritance model to JavaScript. You've been tricked into thinking you're using a class, but you're really not. I understand it's a useful trick, but hooks a…
I disagree. I think that's like saying C++ doesn't actually have classes, it's just syntactic sugar around structs of function pointers. It may be technically correct , but C++ and now JS have a "class" keyword for a reason, and that's to steer you towards organising your code into classes which operate in certain ways. In both languages you can avoid using classes, sure, or abuse classes in various ways. But fundame…
But that’s the point. The way in which classes operate in JS is different from the way classes operate in OOP focused languages like C++, Java and C#. That’s because the language doesn’t have classes, but rather syntax to make it look like it does. On the surface your code will be organized in similar ways but the underlying behavior is different.
Re: What I wish I knew about React
#219Earlier quoted context omitted.
I've been considering the jump into TS, but I don't want to end up in a coffeescript situation (i.e. language is dead, but code lingers on and has to be converted back to JS at some point, rather painfully). Do you think it's worth it?
Yes. It’s built by Microsoft and has huge adoption. Typescript is here to stay.
Re: What I wish I knew about React
#220Earlier quoted context omitted.
HN is a pretty hateful place in general.
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...
HN has a great sense of humor. I know this of course because my jokes have been upvoted.