Live data from Hacker News

Why I'm Not a React Native Developer

arielelkin.github.io

1–10 of 21 posts

Re: Why I'm Not a React Native Developer

#2
Wonderful article! As a JavaScript developer, this is the first time I have seen a well-written critique of the language shortfalls. Usually these counter-arguments can't help but feel like flame wars.

That said, I think every JS feels these pressures internally. In 2015, some were even brave enough to give it a name — "JavaScript Fatigue". I personally work with TypeScript. But each time you kickoff a new project these days, the task of getting past all the boilerplate work seems to be increasingly difficult.

Re: Why I'm Not a React Native Developer

#5
Complaining about longevity of React Native and then recommending two proprietary, non-open-source competitors is, frankly, absurd. If Facebook ever abandons React Native we have all of the code and can continue to support it ourselves. If Microsoft or Appcelerator ever shut down their platforms for any reason, we're SOL.

While there are some valid concerns with using React Native, the productivity gain and community make it a more than worthwhile trade off.

Re: Why I'm Not a React Native Developer

#6
post #5

Complaining about longevity of React Native and then recommending two proprietary, non-open-source competitors is, frankly, absurd. If Facebook ever abandons React Native we have all of the code and can continue to support it ourselves. If Microsoft or Appcelerator ever shut down their platforms for any reason, we're SOL. While there are some valid concerns with using React Native, the productivity gain and community…

I should also mention that we've found React Native to be far more productive to use than Appcelerator or Xamarin. Not sure what the author used to determine those charts near the bottom.

Re: Why I'm Not a React Native Developer

#7
- No clear roadmap

Indeed this would be nice to have!

- No guarantees from Facebook about longevity

As more products within Facebook (eg: Instagram) and companies outside of Facebook are depending on this (Airbnb, Netflix, Alibaba, Microsoft, Baidu, Uber), there is a bigger community of folks who share the burden of keeping it going.

- Legal concerns

This is the same license as React. Given the breadth of companies depending on React (all of those mentioned above, plus thousands more), I suspect that their legal departments considered it to be acceptable. If you don't, that's certainly fine!

- JavaScript problems

JavaScript does have plenty of problems, but it's also what enables a lot of the nice things about React Native (x-platform, ota updates, resource sharing -- as the author identified).

- Alternate frameworks: Xamarin, Appcelerator

I'd like to see the author write a similar assessment of these tools! It's worth noting that the author seemed to be unaware of the existence of React Native for UWP, maybe that would alter his assessment.

Re: Why I'm Not a React Native Developer

#8
Great article. On a side node, however: please don't write code like this:

  var weAreConnected = Math.floor(Math.random() * 10) > 5
  if (weAreConnected === true) {
    this.setState({
      isConnected: true
    })
  } 
  else {
    this.setState({
      isConnected: false
    })
  }
Instead, simplify the logic

  var weAreConnected = Math.floor(Math.random() * 10) > 5
  this.setState({
    isConnected: weAreConnected
  })
The random choice is also overy complicate (and on a side node, the value is more likely to be false then true due incorrect comparision operator usage)

  var weAreConnected = Math.random() 
If we use ES6, we can use the shorthand notation to simplify the code even more

  const isConnected = Math.random() 

Re: Why I'm Not a React Native Developer

#9
I tried react a native a couple of weeks ago but due to a change in android versions the hello world tutorial wouldn't work. I got the distinct impression that it doesn't simplify android development, just adds it's own complexity on top.

The whole native widgets thing gave reminds me of GWT/AWT too, we're going around in circles.

Re: Why I'm Not a React Native Developer

#10
There is no need to complain about Javascript once again, we know it all, the Flow criticism about the percentage of .js files is ridiculous, what is the percentage of Xamarin C# in all C# files ? The whole number is more important that the ratio. Also the portability of Xamarin is overestimated, you choose to use native non portable components or non native one but portable. The longevity of Xamarin is also overestimated, this is closed source software where React Native is open. This is not a good article overall.
Post reply on HN