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…
Why I'm Not a React Native Developer
191–200 of 318 posts
Re: Why I'm Not a React Native Developer
#192Earlier 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.
Re: Why I'm Not a React Native Developer
#193Please 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.
Re: Why I'm Not a React Native Developer
#194Earlier 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.
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
#195Earlier 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?
Re: Why I'm Not a React Native Developer
#196The 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.
Re: Why I'm Not a React Native Developer
#197Earlier 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.
Re: Why I'm Not a React Native Developer
#198Could 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?
Re: Why I'm Not a React Native Developer
#199This 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…
function ConnectivityIndicatorView(props: {isConnected: boolean}) {.. props.isConnected ..}
vs function ConnectivityIndicatorView({isConnected}) {.. isConnected.. }?
Re: Why I'm Not a React Native Developer
#200Maybe 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.