Live data from Hacker News

Why I'm Not a React Native Developer

arielelkin.github.io

201–210 of 318 posts

Re: Why I'm Not a React Native Developer

#201
post #88

As someone who loves React, the hardest thing about it for me is debugging. I'll get some error about how renderComponent doesn't accept null values or whatever, and when even the outermost error is so cryptic, the stack trace is even less helpful. Is there a conventional solution to this I'm not aware of?

As someone who uses a different component-based js framework, can you not just put a breakpoint in the chrome dev tools on the renderComponent method for that component?

renderComponent is not part of any of your components. I think the React equivalent of what you mean is the render method of a component.

The problem I think the OP is talking about is when there is an error thrown somewhere in the react library code (e.g. in renderComponent) and the stack trace doesn't even touch any of your code. That makes it really hard to find the fault behind the error.

This is a lot more common with libraries like RxJS, but I've seen it with React as well.

The only way I know of to deal with these situations is to put console.log calls everywhere in my code until I've narrowed down the source of the bug.

Re: Why I'm Not a React Native Developer

#202
post #61

Earlier quoted context omitted.

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

It is but not due to `Type errors`, `Lack of function signature`, `Immutability`, `You can’t trust arrays`, `Unsafe initialisation`, `Optional curly braces after an if`.

Re: Why I'm Not a React Native Developer

#203

Earlier quoted context omitted.

Uh no. Your application can be completely shut down and push notifications will still arrive on the phone for Android, iOS, and Windows Phone. Once the app is open, you load the new bits of the conversation. Stuff in the background would be like video/audio calls, playing music, actively monitoring motion/gps (MapMyRun/Ride/Swim/etc), and a few other things that escape me at the moment.

I have written an audio app in RN. I have no idea why you think it is not suitable for such use cases. I assume the OP was talking about games.

Is the app publicly available? I'd like to check it out

Re: Why I'm Not a React Native Developer

#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

Re: Why I'm Not a React Native Developer

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

This is a lot more than "simply a list of things the author doesn't like about JS". The first part of the post in fact is totally orthogonal to JS, and all about React Native as a platform/project.

Re: Why I'm Not a React Native Developer

#206
post #61

Earlier quoted context omitted.

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

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.

Re: Why I'm Not a React Native Developer

#207
post #148
post #47

The most part of cons is criticising JavaScript and NOT React Native. I know how JS works, and I LOVE IT. The only part of the post that I liked is when he talks about the license, all the rest is just bullshit from a person who don't like JS.

It's not bullshit if it's a valid consideration when you are trying to build an app on say iOS and weighting it against say Swift. How many times does this need to be said? It depends on what you are trying to do and what you want.

Ok, this is a good point. But, the author just point out the quirks of JS language, and not things about the RN itself. Would be more fair if he pointed out the quirks in python or had focused on the RN. All he says about JS is very well known and is there since 90s. Also, he is saying that its not safe because he can't understand and workaround with the pitfalls, JS has a lot of problems, but also has a LOT of great solutions for them, and by that this not means that the language is not safe, just means that its harder to work with.

Re: Why I'm Not a React Native Developer

#208

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.

2 minutes isn't 70% of 5 minutes. It's only 40%. Yeah, nitpicking, I know.

Re: Why I'm Not a React Native Developer

#209
post #40

JavaScript has its share of bad things but that's mostly solved by good tooling. I think Java or ObjectiveC feel too "heavy" for UI development. React makes it simple and even with its downsides in my opinion it makes other technologies no longer relevant in this domain .

>it makes other technologies no longer relevant in this domain Are you really trying to say that React Native makes Java not relevant for Android and ObjectiveC/Swift not relevant on iOS. Maybe you are correct if you want to build Hello World application, when you will be needing something more optimized sooner or later you'll have to rewrite it in Java/Swift.

Do you have any specific example where Java or ObjectiveC/Swift would be of better use?

Re: Why I'm Not a React Native Developer

#210

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

A programmer whose output is measured by LOC...
Post reply on HN