Live data from Hacker News

Why I'm Not a React Native Developer

arielelkin.github.io

101–110 of 318 posts

Re: Why I'm Not a React Native Developer

#102
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.

Re: Why I'm Not a React Native Developer

#104
post #96

Earlier quoted context omitted.

Not necessarily. Swift uses ARC by default, and you'd really have to go out of your way to do any manual memory management.

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.

Re: Why I'm Not a React Native Developer

#105
post #84
post #70

Earlier quoted context omitted.

For what purpose is dynamic typing ever useful except "it’s faster to develop"? With a proper type system (see: Haskell, Scala) and parametrized types, you can do everything that’s reasonable in a dynamically typed language, too.

You can do them, as you noted, at a much slower pace. Type systems catch one class of bugs, and if in your experience these are not the bugs you worry about or the bugs that cause you the most pain then slowing down development is a high cost to pay.

It goes beyond just catching bugs. Large code bases written in statically typed languages are easier to understand.

I've worked on large production codebases in the past, for servers written in both Java (at company [a]), and JavaScript with Node.js (at company [b]).

The Java codebase was much easier to read, understand, navigate around, and debug. If a function took an argument "SomeClass foo" I could look up "SomeClass" and know exactly what it was.

In the Node codebase, if have argument "foo", you're lost with no easy way to figure out exactly what this "foo" is. You would have to run the code, set a breakpoint, and inspect "foo".

In addition, JavaScript encouraged a lot of bad coding practices that almost made me want to cry.

In the Java server, we used a JSON library where you would annotate a class, and the library would construct an object for that class. This guaranteed the JSON was well-formed, among other things.

In the Node.js codebase, people would pull something out of Mongo, chuck it in a variable "data", and then do "data.foo.bar[1].qux". (Yes, the "[1]" is real.) It was terrible.

The company that used Node.js had far less reliable code overall, and their services (written in JavaScript) would crash frequently, most commonly due to type errors.

And this is just a tip of the iceberg. There were so many problems that attributable to the choice of JavaScript as the language for a large, complex back-end system, and the failure to use any tool for type checking (like Flow), in addition to bad coding practices.

[a] Amplify Education, Inc. https://www.amplify.com/

[b] Lifion, a division of ADP. http://www.lifion.com/

Re: Why I'm Not a React Native Developer

#106

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.

Re: Why I'm Not a React Native Developer

#107
There is a bug in his code in the `Unsafe initialisation` section. He tries to access variables that are not defined in that scope. A linter would have caught that.

Javascript is like democracy. It works best when:

- lots of people participate

- we understand its warts

- it's allowed to evolve

- the powerful aren't allowed to write the rules

Re: Why I'm Not a React Native Developer

#108
post #61
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…

> 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. That's definitely not a fair characterization of this article. Concerns about roadmap and patent usage show up before any concerns about JS. Edit: Though I agree, a strangely large amount of the article is dedicated to "Why I just don't like Javascript."

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

Re: Why I'm Not a React Native Developer

#109
post #84
post #70

Earlier quoted context omitted.

For what purpose is dynamic typing ever useful except "it’s faster to develop"? With a proper type system (see: Haskell, Scala) and parametrized types, you can do everything that’s reasonable in a dynamically typed language, too.

You can do them, as you noted, at a much slower pace. Type systems catch one class of bugs, and if in your experience these are not the bugs you worry about or the bugs that cause you the most pain then slowing down development is a high cost to pay.

Honestly I think the bug catching aspect of static typing is its least useful property. (Useful, but not like, amazing -- you can write assertions on a type in a dynamic language). I think the good thing about static typing is it makes a code-base much easier to navigate and much more self documenting. I spend most my time navigating other peoples code. I know you can get most of the reliability of static typing with extensive test suites etc., but that doesn't help my IDE and it doesn't let me look up parameters at a glance. I used to be firmly in the dynamic camp, but having to maintain other people's javascript definitely made me do a 180.

Re: Why I'm Not a React Native Developer

#110

Reasons why I am a React-Native developer: - It works, really well. - Iteration speed alone has helped us retain at an extremely high DAU/MAU ratio compared to years past. - Both my apps have near 5 star rating across the board, probably the highest rated in the Sports category since we released, and none of our users notice that it is a RN app, which is really surprising b/c RN on Android is not up to par with iOS.…

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

Dare I say games? I honestly can't think of anything else.
Post reply on HN