Live data from Hacker News

React Native at Airbnb

medium.com

91–100 of 259 posts

Re: React Native at Airbnb

#91

Earlier quoted context omitted.

Well, the `mapDispatch` example can certainly be simplified. `connect` supports an "object shorthand" - just pass an object full of action creators as the second argument, and they'll all be bound up and passed in as props. So, your `mapDispatch` example can just be: const actions = {onTodoClick : toggleTodo}; export default connect(mapState, actions)(ChooseFontLevel1); Other than that... there's 1 import line for `c…

Easy for you (and me to some extent) to read what you say and see hey yes it could be more simple.... What is simple for any Redux-experienced person is a gigantic cognitive cliff for people who are not experts. I can still remember trying to learn ReactJS and Redux and bailing out on Redux while I tried to make sense of mapping dispatch to props. Redux should not be losing users at that point. Your earlier post expr…

Unfortunately, the library you describe wouldn't be Redux at all. Part of the core point of Redux is to separate out the act of describing some event or update that needs to occur, from the process of applying that update. That's what makes time-travel debugging possible, and it allows middleware to modify the actions that are passing through the store. In all honesty, if you want objects with methods, MobX is what you're looking for.

Not quite sure what that "single object" sentence is trying to say, but that also sorta sounds like MobX's wrapping up of components with `observe()` (which ultimately does the same kind of thing `connect` is doing, just in a rather different way).

(Also, fwiw, Redux is completely separate from the React team. Dan Abramov and Andrew Clark, the creators of Redux, _do_ work on React at Facebook now, but Redux is not a Facebook project, and Dan and Andrew are no longer active maintainers. We talk with them a lot, and they obviously have a vested interest in Redux, but it's separate.)

And thanks, appreciate the compliment.

Re: React Native at Airbnb

#92
post #61

Earlier quoted context omitted.

You have to wonder how many of their 100 engineers are going to dislike having to become iOS/Android devs.

The vast majority of the 100 always have been and are still Android and iOS devs. React Native never made up more than 10-20% of our mobile engineers and many of them came from Android or iOS backgrounds.

How's FB's RN team reacted to Airbnb's decision to move away from RN?

Re: React Native at Airbnb

#93
post #12

While i don't have much experience in RN, but have a decade of mobile native development (android + iOS) and two years of React. The whole 10 years there were people that think that they can just get "web" technology and speedup mobile development. Almost always this companies had no mobile engineers that know how this stuff works. Developers that know that you just can't listen to scroll and update animations by sen…

> that they can just get "web" technology and speedup mobile development.

RN isn't really web technology. It is a JS engine along side a cross platform API translates API calls to the appropriate underlying native platform code. UI components rendered by RN do not use web tech at all.

It is no different than Xamarine in that regard, and has many of the same drawbacks.

> AirBNB's app is barely usable on two-year-old androids.

I never had problems with it on my Nexus 5x, and everything was a lag fest on that phone. (Lag in daily use got so bad after moving to Android 8 that I had to get a new phone just for my sanity.)

For a large # of apps, RN works just fine. Its real promise is not "web technology", so far as it is 99% code sharing across platforms.

The other players in this market don't have the same community drive that RN does, so people gravitate towards RN.

Re: React Native at Airbnb

#94
post #43

Earlier quoted context omitted.

I think what they meant is that there is no built-in production-ready navigation library, which is honestly atrocious.

I never understood the obsession with native navigation libaries. I built a bunch of apps with JS navs and nobody ever complained...

"Built-in" and "native" don't mean the same thing last time I checked.

Re: React Native at Airbnb

#95
post #70

"While debugging, React Native attaches to a Chrome Developer Tools instance. This is great because it is a powerful debugger. However, once the debugger is attached, all JavaScript runs within Chrome’s V8 engine. This is fine 99.9% of the time. However, in one instance, we got bit when toLocaleString worked on iOS and but only worked on Android while debugging. It turns out that the Android JSC doesn’t include it an…

I ran into a fun one like that many years ago in IE. The JavaScript I had written was failing, but when I opened up the devtools to debug it, it worked. It turned out that in that version of IE, the console object only existed when the devtools were open. So a stray console.log call was causing an exception because console was undefined. But when I opened the devtools to see what was going on, console existed and so…

I've experienced this console.log bug too

Re: React Native at Airbnb

#96
post #87

What is wrong with TurboLink 5? Not Turbolink 3 or previous version, v5 is very much a total rewrite. Turbolinks 5 allows hybrid Apps that offers most of the benefits without many of the complexity, it is HTML after all. It seems there are sites that uses Rails, including AirBnB. But I have yet to seen a site that uses Turbolink apart from Bassecamp, even Github uses its own version of pjax rather then Turbolink.

I use the turbolinks libraries for iOS and android and the experience has been great.

Re: React Native at Airbnb

#97
Very good write-up, thanks for posting.

Some of the frustrations definitely hit home. I think for small teams and indies React Native is an awesome piece of technology that can enable them to target both platforms where it would be nearly impossible otherwise. I can understand how orchestrating the work of a huge team could introduce new issues though.

It would be interesting to know why some of the infra layers that the article mentions (i18n, networking) were behind bridge when they seem like prime candidates for js implementation.

What I'd really like to know though is how other teams are managing the design pipeline (getting from psd/sketchapp to code without hand coding flexbox styles). We've looked at some tools like supernova.studio and BuilderX, and while showing promise these seem like they have a long road ahead.

Re: React Native at Airbnb

#98

Earlier quoted context omitted.

Easy for you (and me to some extent) to read what you say and see hey yes it could be more simple.... What is simple for any Redux-experienced person is a gigantic cognitive cliff for people who are not experts. I can still remember trying to learn ReactJS and Redux and bailing out on Redux while I tried to make sense of mapping dispatch to props. Redux should not be losing users at that point. Your earlier post expr…

Unfortunately, the library you describe wouldn't be Redux at all. Part of the core point of Redux is to separate out the act of describing some event or update that needs to occur, from the process of applying that update. That's what makes time-travel debugging possible, and it allows middleware to modify the actions that are passing through the store. In all honesty, if you want objects with methods, MobX is what y…

[deleted]

Re: React Native at Airbnb

#99
post #34
post #24

Earlier quoted context omitted.

I had something like that once in native web dev. It turned out that by default when using the debugging pane the browser would disable cache so the issue (whatever it was) disappeared. Close debugging? It broke again. Maddening.

You can disable cache while dev tools are open in chrome but its not the default.

And, annoyingly, if you check the disable box any time you close the dev tools it resets to unchecked. If you reopen dev tools it still remains unchecked.

Re: React Native at Airbnb

#100
post #10

Yet another company discovers what many of us did ages ago with multi-platform frameworks. Additional layers not supported by platform owners, mean extra debugging efforts tracking down which layer is responsible, catching up with native SDK features, need to be an expert at both layers, lack of integration with native debugging tools... But business always wants the Ferrari solution at the cost of a Fiat panda.

One thing weird for me is I've had issues with Javascript UIs on different platforms but Java backends running on different platforms actually have been pretty consistent. Is there something about javascript or UIs (or both) that make cross platform support difficult?
Post reply on HN