React Native at Airbnb
41–50 of 259 posts
Re: React Native at Airbnb
#42"Redux is notorious for its boilerplate and has a relatively difficult learning curve. We provided generators for some common templates but it was still one of the most challenging pieces and source of confusion while working with React Native." Interesting to see even Airbnb struggles with Redux
Re: React Native at Airbnb
#43Earlier quoted context omitted.
> Right now there are still no navigation library. React Navigation and React Native Navigation are both viable options with their own pros and cons. Been using them successfully in different projects. https://reactnavigation.org https://wix.github.io/react-native-navigation
I think what they meant is that there is no built-in production-ready navigation library, which is honestly atrocious.
I built a bunch of apps with JS navs and nobody ever complained...
Re: React Native at Airbnb
#44I haven't used React Native, but I've ready a few posts from people adopting it. They typically test the waters by writing new app views in React Native instead of rewriting everything. But how much cognitive overhead is there in maintaining multiple toolchains (React Native and native and/or web views) and debugging views in different languages in one app?
Re: React Native at Airbnb
#45Really curious as to how Flutter (and Xamarin, NativeScript, Ionic, Vue-based write-once frameworks, etc.) can overcome the difficulties expressed in this piece.
Re: React Native at Airbnb
#46This is a really good write up and I love how they were cautious not to feed the ongoing fanboyism in for and against React Native folks. Say what you like but this is a very mature move from a young engineering organization.
Airbnb is ten years old at this point, I'm not sure that really counts as young!
Re: React Native at Airbnb
#47"Redux is notorious for its boilerplate and has a relatively difficult learning curve. We provided generators for some common templates but it was still one of the most challenging pieces and source of confusion while working with React Native." Interesting to see even Airbnb struggles with Redux
The cognitive overhead of redux ends up being pretty high due to the boilerplate in my opinion. It feels like complexity increases very linearly as project size goes. I've found that MobX translates to a much simpler mental model, though it does have a variety of quirks to deal with that Redux doesn't face (like converting objects to non-observable for test case assertions)
Re: React Native at Airbnb
#48"Redux is notorious for its boilerplate and has a relatively difficult learning curve. We provided generators for some common templates but it was still one of the most challenging pieces and source of confusion while working with React Native." Interesting to see even Airbnb struggles with Redux
Having never worked with Redux, what is its point? Is it really so hard to stick app state in a JS object and databind off that?
The main point of Redux is to make your state updates predictable and traceable throughout the codebase.
Sure, you can create a global object and stuff your data in there. But, if any random part of the app is allowed to modify that object at any time, then it's a lot harder to understand how your app got into a particular end situation.
Redux is based on the "Flux Architecture" concept, and asks you to follow restrictions on how you structure your logic. Only certain functions are allowed to update the state, and in order to run that logic, you create plain JS objects called "actions" that describe some event or update that needs to occur, and ask the update logic to determine the new state values in response.
This adds a level of indirection to your code, but it provides a way to log and trace when, where, why, and how a given piece of state got updated.
If you've got about 45 minutes, I did a "Redux Fundamentals" presentation at Reactathon a few months ago that walks through the basic principles of Redux. Here's a link to the video and the slides:
https://blog.isquaredsoftware.com/2018/03/presentation-react...
Re: React Native at Airbnb
#49Earlier quoted context omitted.
The cognitive overhead of redux ends up being pretty high due to the boilerplate in my opinion. It feels like complexity increases very linearly as project size goes. I've found that MobX translates to a much simpler mental model, though it does have a variety of quirks to deal with that Redux doesn't face (like converting objects to non-observable for test case assertions)
Yeah, MobX is significantly easier to reason about, even if it may have a few idiosyncrasies that make debugging more challenging. Also, performance optimization of React components is a cinch with MobX and a nightmare with Redux.
Re: React Native at Airbnb
#50Really curious as to how Flutter (and Xamarin, NativeScript, Ionic, Vue-based write-once frameworks, etc.) can overcome the difficulties expressed in this piece.