Live data from Hacker News

Why I'm Not a React Native Developer

arielelkin.github.io

231–240 of 318 posts

Re: Why I'm Not a React Native Developer

#231
post #11

This is a nit pick, but isn't his "Ambiguous curly braces" example actually breaking due to automatic semicolon insertion? return {{a: 4}} Isn't valid anyways. ESLint easily flags it as an error.

Exactly: Linting rules requiring semicolons should be considered a best practice. But I think TypeScript should also be considered a best practice, and between the two that would solve pretty much all of his complaints. Well, that and using "==" to compare to null, vs. "===" to compare to everything else. But the linters all can make that distinction as well. But he explicitly hates on linters in the article as well.…

For anyone else reading this in the future, I should mention that the ESLint 'no-unreachable' rule will catch this even if you don't require semicolons.

Re: Why I'm Not a React Native Developer

#232
post #53

Earlier quoted context omitted.

Why? (Honest question.)

Because it gives Facebook legal leverage over your company.

You mean unlike every company that is behind any other project you are relying on that doesn't come with an explicit patent grant?

In other words you have no MIT or BSD licensed dependencies, or in fact no open source dependencies that don't either come with an explicit non-revocable patent grant and aren't licensed under Apache 2.0, GPLv3 or MPL 2.0 (all of which by the way still terminate the patent grant if you sue over infringement of patents within the licensed code itself).

Lucky you?

Re: Why I'm Not a React Native Developer

#233

Earlier quoted context omitted.

...but so many smaller companies and startups use React. Personally all of my employments (five at this point) have used it and none had more than twenty programmers. Has it actually been an issue in real life?

For example: You make something remotely similar to Instagram and it takes off. FB sues you and takes all your reacts and natives from you. You left with nothing.

Or FB sues you over literally any patent you happen to be infringing. They're a big company, I'm sure their patent war chest has a few zingers for cases like these.

Oh, and your scenario only works if you sue FB/Instagram over your patents first. They can't revoke the patent grant willy-nilly except in retaliation.

Re: Why I'm Not a React Native Developer

#234
post #204

var a = 0; var b = -0; console.log(a === b) // true console.log(1/a === 1/b) // false That's perfect math you mean, of course -Infinity != Infinity, what did you expect? I think you should rather think harder, learn math possibly, and your 'safety' problems with arrays are not problems at all, it's the opposite for other people

I'm not sure that's right. 1/0 is undefined NOT infinity, hence -1/0 is also undefined . So actually line 3 should evaluate as true.

NaN === NaN evaluates to false. That’s what happens here, not anything with Infinity.

Re: Why I'm Not a React Native Developer

#235

Earlier quoted context omitted.

That is a very fair characterization of the article - 70% of the article's content is about why JavaScript is bad.

70% of the content is not necessarily "the most important part of the content". 2 minutes in a 5 minute animation short are the credits.

You know theres no 5 minute animation shorts with 2 minute credits in existence.

Re: Why I'm Not a React Native Developer

#236

Earlier quoted context omitted.

That is a very fair characterization of the article - 70% of the article's content is about why JavaScript is bad.

Then why don't you drink this glass of 70% orange juice and 30% motor oil, since by your definition it's "simply orange juice". I sure am glad to know about the patent considerations in this simple criticism in this JavaScript, as I've decided not to use React because of them.

You should read @pluma's explanation of the patent grant. I think its purely a misconception that's unfortunately been regularly repeated.

> Then why don't you drink this glass of 70% orange juice and 30% motor oil, since by your definition it's "simply orange juice".

I think a more proper correlation of your analogy vs OP's argument would be if you held it up and claims "why I won't be putting this motor oil into my car" and OP pointed out "that's because it contains mostly orange juice." Its intended to be an article about the con's of React Native, but is mostly an article about the cons of Javascript. Its a very well written article and (imho) its best parts are the concerns of long-term development of an entirely distinct ecosystem.

Re: Why I'm Not a React Native Developer

#237

A lot of people here seem to criticize the OP's POV on javascript, but my biggest takeaway was the more abstract parts of his post, such as patents and uncertain roadmap. These are very REAL problems. I am a javascript programmer AND an iOS programmer. I work with React to build web apps at work. And lately I have played around with react native, but I felt uneasy jumping ship to use solely react native for the very…

I agree with you. I have almost no iOS or Android programming experience. I built my own little work out app in react native, because it's a tech stack I know pretty well. But I do run into issues where it stops working, and I need to do a bunch of dependency updates and rebuild it. Might be worthwhile for me to just learn Swift and the UIKit APIs.

When I started my current job, I was talking to our tech director on how ive been using react native a bit. Been meaning to do an internal demo for it. I do find some of the development tools awesome, but really when we already have experienced iOS and android devs in house, why not keep growing in that area instead? React Native could be a way to do some quicker business wins, with clients that need cross platform in a short time frame. But I'm not convinced it's the right solution outside of that.

Re: Why I'm Not a React Native Developer

#238
I love this quote from the article:

"The fact that millions of drivers productively drive cars without wearing a seatbelt isn’t a good argument for cars with no seat belt. Similarly, the fact that millions of JavaScript developers productively use an inherently unsafe language isn’t a good argument for the use of unsafe languages."

Re: Why I'm Not a React Native Developer

#239
post #229

Please what kind of programmer would ever do this? if (weAreConnected === true) { this.setState({ isConnected: true }) } else { this.setState({ isConnected: false }) } That is just verbose unnecessarily: this.setState({ isConnected: weAreConnected }); And probably not so popular, but this: var color; if (this.state.isConnected) { color = 'green' } else { color = 'red' } Would be simplified often to: var color = this.…

"Please what kind of programmer would ever do this?" I've seen some coding rules/guides that explicitly forbid short form of 'if' statement usage.

That statement is about the first code block; the second one as I commented is totally optional and I agree that it might not follow some code rules (;

Re: Why I'm Not a React Native Developer

#240
post #230

Earlier quoted context omitted.

Well then, if no true programmer likes dynamically typed languages, I'd better make some calls... Hey, RMS, Abelson, Sussman, Steele, Guido, Larry, Matz, Richard Gabriel, ESR, DHH, Flatt, and Felleisen, it turns out you're not true programmers! Okay, cool. Needless to say, I claim No True Scottsman.

Lisp, though, does have types.

All languages have types. Lisp, however, and particularly the versions that those people worked with, are dynamically typed, like Javascript. Unlike JS, they aren't weakly typed, but that's not the point. To say nothing of Ruby and Python, for which there are also programmers on that list.
Post reply on HN