Live data from Hacker News

Why I'm Not a React Native Developer

arielelkin.github.io

191–200 of 318 posts

Re: Why I'm Not a React Native Developer

#191
post #42

Earlier quoted context omitted.

I used to half joke like this, but recently I've been doing some React work in ES6 with Flowtype annotations. It's actually not that bad.

Exactly. Flow even has tagged unions now, and `maybe` types. TypeScript is also a very mature solution to this problem. A true professional works with whatever language he needs to solve his/her problem, and shores up that language with the best tools available. In this case, I half agree, because I think mobile development is best done using native platforms. But if you're doing web development, JavaScript is a must…

A true Scotsman comment nested in another true Scotsman comment. It's haggis all the way down!

Re: Why I'm Not a React Native Developer

#192
post #14

Earlier quoted context omitted.

I feel like this is some sort of signaling, a la 'no true programmer uses javascript, because types!'.

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.

I see it like; smart,disciplined programmers are capable of writing complex programs in dynamically typed languages without making as many errors.

Re: Why I'm Not a React Native Developer

#193

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.…

> what kind of programmer would ever do this? An enterprise developer.

Laughed too hard

Re: Why I'm Not a React Native Developer

#194
post #111

Earlier quoted context omitted.

>React-Native is not for every scenario What scenario isn't it for?

Anything where you need to stay alive in the background and periodically do something.

Utterly false. Staying alive has nothing to do with React Native or Cordova or any particular framework. It's about implementing the native APIs that allow that behaviour.

I'm the author of a couple of modules that allow your RN app to operate in the background:

https://github.com/transistorsoft/react-native-background-fe...

https://github.com/transistorsoft/react-native-background-ge...

Both of these modules were ported from Cordova and have since been ported to NativeScript.

Re: Why I'm Not a React Native Developer

#195

Earlier quoted context omitted.

Besides, while JS's problems are very real, they're quite exaggerated. It's still a perfectly usable language, even without TS and whatnot. And unlike some languages used for app programming, an error doesn't have the potential to hand you a segfault.

> ...an error doesn't have the potential to hand you a segfault. And that is a good thing why? So you don't realise there was an error and your app runs on in a corrupted state?

If you segfault, that's not because your state is corrupt. Not usually, anyways. Typically, you'll segfault from a use-after-free error or similar.

Re: Why I'm Not a React Native Developer

#196

The legal concerns are legitimate, but frankly, I am unconvinced by the criticisms of JavaScript: There are well-known, well-designed tools like ESLint, and if you like types, Flow and TypeScript, which can mitigate the issues. That's more than you can say about Java (COBOL 2.0, now with a bevy of cargo-cult OO that makes things more overly complex), or Objective-C (All the safety of C, with similar OO problems, and…

The standard defense of JavaScript is no different than the standard defense of PHP. There are good arguments but that is still the camp you're in.

JS's sins are far less than those of PHP, however.

Re: Why I'm Not a React Native Developer

#197

Earlier quoted context omitted.

Ah. I originally talking about Objective-C, so I assumed that we were talking about manual memory management. Of course, ARC has its own problems... Hope anybody implementing graphs knows what they're doing, or you'll leak memory like Niagra Falls.

Objective-C also uses ARC by default, and that's been the case for several years now. In any event, avoiding retain cycles is relatively straightforward and most iOS devs I know would agree that the low memory overhead and lack of GC pauses are worth the occasional extra effort of weak references.

I didn't know that Objective-C defaulted to ARC. Thanks for the information, and I am sorry for misrepresenting the language.

Re: Why I'm Not a React Native Developer

#198
post #144

Could FB plug the cord on React once it does no longer align with its core strategy? Sure, it did it with parse.com without the least concern for the community of users/clients. The apology was to leave behind a half-cooked open source version of parse server. The exact same thing could happen to the React community. I'd say stick to true open source projects and descentralized communities.

What's not true about the open source of React?

Developed by a company, if they stop it's still open source but who will maintain it? Linux is "truer" open source since it's all volunteers from day 1.

Re: Why I'm Not a React Native Developer

#199
post #21

This is simply a list of things the author doesn't like about JS, very much of which is practically solved by Flow/TS and ESLint. He also makes some of the React examples quite a bit more complicated than they need to be. Declarative UI is very simple! Here's the same code, using both class and functional styles (whichever you prefer), in a much more succinct style (11 LOC vs 49): class Root extends Component { rende…

what's the point of

function ConnectivityIndicatorView(props: {isConnected: boolean}) {.. props.isConnected ..}

vs function ConnectivityIndicatorView({isConnected}) {.. isConnected.. }?

Re: Why I'm Not a React Native Developer

#200

Maybe nitpicking, but the author states that "Your codebase can now create an app that can run on millions of additional devices, and you’ve increased your outreach by several orders of magnitude." Yeah, Android is growing, but iOS still has substantial market share. Switching to React Native will definitely not give a > 100x increase in outreach.

The Android market share is >60% and rising, though. Not sure what you're talking about. https://bgr.com/2016/06/02/apples-mobile-market-share-sees-b... You're right about the last part, though. You won't literally get a 100x increase in reach from just switching to React Native. Being able to develop on two platforms at once might help a little bit there, though, which is what I think the author was trying to say.

The nitpick being that usually, one order of magnitude = 10x, two orders of magnitude = 100x, and so on. So it's a very exaggerated statement if taken at face value.
Post reply on HN