Hacker News new | ask | show | jobs
by vjeux 4084 days ago
> 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 :(

1 comments

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!)