Hacker News new | ask | show | jobs
by orand 4084 days ago
Fascinating comment from Christopher Chedeau of React: "The end game isn’t ReactNative. We want the web to win. Would be great for Angular to try to implement on top of our same primitives to see if we could share the work."

It's as if ReactNative is being treated (strategically) as a more powerful version of PhoneGap.

4 comments

I don't see why any reasonable developer would choose building the same app on multiple platforms over building it once on a standardized platform and having it just work everywhere.

That is, of course, if the standardized platform had all the capabilities and great UX of the proprietary platforms. This is where the web often falls short, and the companies behind proprietary platforms have some very sweet incentives to keep it that way, i.e. developer lock-in and maintaining complete control over the platform's direction.

Despite all the impediments, I still firmly believe an open platform will triumph eventually, because developers love efficiency, and the current landscape of wasting work on rebuilding for proprietary platforms is anything but efficient.

> I don't see why any reasonable developer would choose building the same app on multiple platforms over building it once on a standardized platform and having it just work everywhere.

Platforms have different characteristics: different input methods, different display sizes, different common use cases, different interface conventions and standards, different conventions for connection to online platforms, ...

If you’re making a self-contained game for iOS and Android (for example) then sure, something identical across platforms is better. In the case of a general “app”, you’ll get a better result if you design the interface from first principles on each platform.

Yes, platforms have different characteristics, but there's no reason why any of these characteristics can't eventually be abstracted behind a standardized API that allows developers to interact with it in the same way across all platforms.

I should have been more specific in my original post. I'm not advocating that a smartwatch interface should be built on the codebase as that of the phone interface. Rather that a smartwatch interface for an app on iWatchOS (I'm actually not sure what the official name is) should be built from the same codebase as a smartwatch interface for an app on Android Wear, with platform capability or design convention differences handled on a case by case basis as exceptions rather than the rule, ideally abstracted away by the standardized APIs themselves or frameworks built on top of these APIs (the Ionic Framework is an example of something that does this extremely well for smartphone development that's built on top of open standards).

At the end of the day, user interfaces for hardware of the same form factor generally share more than they differ regardless of what software platform they're on. The fact that code sharing ratio across platforms in the typical native app development process does not reflect this indicates that there's room for improvement.

The web is not ready to completely replace proprietary platforms yet, but I'm willing to bet my career on the hope that eventually, it, or some other standardized platform, will be. I wouldn't want to work as an app developer in a future where this isn't the case anyways.

My toaster needs a different UI from my phone. My phone doesn't need a different UI from my other phone.
That's interesting. I made and launched Reapp a couple months ago and one thing I noticed was the absence of any support from the React team. Not a single retweet from the React account (who are very active at supporting community projects), not a single React team dev commented on it. I had to ask them for some love, so in response they favorited a tweet of mine.. Meanwhile the same day react-canvas launched and nearly all of them were very active helping promote it.

Needless to say I got the message. Don't step on their toes! During the React Native launch video they said, basically, "the web doesn't work for native".

Anyway, I'll continue to port the cool stuff from Native back to Reapp. I don't hold anything against them, in fact it's nice to hear they are actively pursuing bringing stuff from Native back to the web. I look forward to seeing what comes of this.

(I work on React.)

I don't think this was intentional, and I'm sorry if it came off that way. We've certainly pointed people interested in building mobile apps at TouchstoneJS and I'll point people at Reapp too now that I know about it – obviously React Native isn't appropriate in all situations. Will try to keep an eye out and retweet some stuff of yours in the future.

I think this is more of a product of staying focused on what they need to work on. I would have been surprised if they did actively help you guys enhance Reapp. I mean just by open sourcing react native they are making huge contributions.

Not trying to just back them for no reason, but I'm happy with what they are giving the community.

No doubt, they are all great people. It may have just been misunderstanding, but the cumulative effect just felt that way.

I love React and their team, and am incredibly positive on the future of what FB is doing.

Well, if AngularJS 2.x is made of modular components as the team says one could be able to ditch Angular view layer and swap it with React.Angular got dependency injection right that allowed easy communication between multiple components. If they plan to ditch scopes and the digest cycle then there would be no relationship whatsoever between directives and injection. The only difference between Angular view layer and React would be the use of Typesript for the former and JSX for the later.

> It's as if ReactNative is being treated (strategically) as a more powerful version of PhoneGap.

ReactNative is like Titanium/Alloy. It uses native components to render views, not the DOM. So it has nothing to do with Phonegap except for the use of javascript.

> ReactNative is like Titanium/Alloy. It uses native components to render views, not the DOM. So it has nothing to do with Phonegap except for the use of javascript.

I believe the original poster was referring to the fact that Cordova's whole purpose is to be a testing ground for new browser APIs - and that the goal of the project is to basically become irrelevant at a later point because browser vendors hopefully will have implemented similar APIs.

Sort of like a testing ground for web standards.

But yes, in a technical sense React Native is closer akin to Titanium than Cordova/PhoneGap in its current state.

I'm not that familiar with angular, but the whole advantage of react is that components don't need to communicate at all.

Angular seems to be a framework devoted to wrangling state. React eliminates state.

> The only difference between Angular view layer and React would be the use of Typesript for the former and JSX for the later.

I think you meant either

1. the use of HTML for the former and JSX for the later

2. the use of TypeScript for the former and Flow for the later (this isn't true, can use either one with either framework)

If they want the web to win, then why didn't they design ReactNative to have an API that is a subset of HTML (where possible)?

With their current API, we can't use the code written for RN on the web.

> With their current API, we can't use the code written for RN on the web.

We actually designed React Native to work on the web. The layout and styles are a strict subset of CSS, the base component such as <View>, <Text> and <Image> can be easily implemented on-top of <div>, <span> and <img>. The gesture system is written in pure JavaScript as a React event plugin and should work as well.

It's just that it hasn't been a priority so far to exercise this possibility. But, every once in a while we make some example runs on the web. For example, two days ago during a hackathon we made 2048 example run (and work) in the browser by modifying less that 10 files.

> The end game isn’t ReactNative. We want the web to win.

Even though I was one of the few people that started React Native, I --really-- did not want it to exist in the first place. But, the sad truth is that you cannot build high quality, gesture heavy, apps on mobile web today :(

For the hackathon, we decided to get the React Native 2048 example playable in the browser. We got started after the kickoff at 11AM, and we had it playable by lunch: http://i.imgur.com/UY5ojXZ.png

We really do care about the web, and before very long we will be able to build great apps for web and on native, with a lot of code re-use. (And if you're willing to hack it, then you can do that today!)

Because HTML doesn't map to native components and provides a subpar experience.