r/programming • • Jun 19 '18

Airbnb moving away from React Native

https://medium.com/airbnb-engineering/react-native-at-airbnb-f95aa460be1c
2.5k Upvotes

581 comments sorted by

View all comments

Show parent comments

60

u/LyeInYourEye Jun 20 '18

I love redux. I don't see what the problem is. Take a week and learn it? It seems to make sense to me.

94

u/[deleted] Jun 20 '18

I used redux for enough time to know that I spent way too much time typing and hopping around files for simple stuff.

54

u/aonghasan Jun 20 '18

But thanks to that it's so maintainable.

23

u/[deleted] Jun 20 '18 edited Jun 20 '18

I fully agree, but the amount of boilerplate is why I decided to go from "full stack" to solely backend. I want to spend my time on problems, not writing glue to piece the problems together.

2

u/IceSentry Jun 20 '18

What backend language are you using? Java is one of the worst when it comes to boilerplate.

2

u/[deleted] Jun 20 '18

Java is one of the worst when it comes to boilerplate.

Haha. I'm at a node shop -- there would actually be a lot of boilerplate to write if I was working on features, but right now my job is to write code that reduces boilerplate for other engineers, which is one of my favorite things to do. e.g. When someone starts writing a new route, they have a helper function that provides their error client, logger, hooks everything into our server automatically, etc. Right now it's a much more manual process.

4

u/mayhempk1 Jun 20 '18 edited Jun 20 '18

Front-end can still be nice. Example: Vue.

edit: argh, the downvotes, it burns!

15

u/nirataro Jun 20 '18

VueX is the shit.

5

u/[deleted] Jun 20 '18

Yeah I tried to learn redux just playing around a bit with React and i was like what the fuck is this, it made no sense to me.

Vuex maybe took me a day or two to wrap my head around and quickly seemed natural.

2

u/[deleted] Jun 20 '18

To be fair, I think most redux tutorials out there suck and they often show you how to work with 4 other libraries at the same time. Redux itself is really really simple, it's more wrapping your head around the concepts than the code.

I'll check out Vuex today though.

→ More replies (1)

7

u/compubomb Jun 20 '18

Amen to that. I actually think Vuex makes so much more sense than redux. Redux to me always feels insanely verbose. And then how you have to tie it together feels just as strange.

3

u/VIM_GT_EMACS Jun 20 '18

VueX coupled with NuxtJS is my go to for work

2

u/Hidden__Troll Jun 20 '18

Sounds like an organizational problem. I've ran into this before also. Look into three ducks

→ More replies (2)

10

u/[deleted] Jun 20 '18

Redux makes complicated state possible to reason about. It does this at the cost of boilerplate, indirection and an awkward approach to async. I think I've only ever seen one Redux project actually justify these costs, and that was the article editing suite we wrote for reporters at The Guardian, back in 2015.

All the rest have been fairly trivial apps that could use React setState or possibly no client state at all.

2

u/d_rudy Jun 20 '18

That's the way I went for my most recent React apps, and only leaning on React Contexts for some stuff like user info and error handling that was needed in disparate components. I think a lot of people reach for Redux too quickly; it's definitely overkill for most projects I've seen it used in. Half the time, I'm happy to write my own state machine to do Reduxy things, just because I think Redux is over-engineering a lot of the time. That said, I won't write it off completely because I can definitely see the usecase for sufficiently complicated apps.

3

u/nomadProgrammer Jun 20 '18

Redux documentation (at least 1 year ago), was very complex and pompous. They should learn from Vue.js to give a better simpler documentation. Also it is full of boilerplate BS. Happy to no longer work with React or ReactNative Bs.

3

u/acemarke Jun 20 '18

I'm a Redux maintainer. Could you give some specific examples of what you're referring to?

I'm always happy to have people help improve our docs.

2

u/compubomb Jun 20 '18

I found a react-vuex workflow :)

0

u/[deleted] Jun 20 '18

[deleted]

2

u/d_rudy Jun 20 '18

I haven't gotten much out of TypeScript to be honest. It's kind of a bolted-on type system that requires a fair amount of discipline from all developers involved. I've gotten a lot more out of the full-fledged type systems in ReasonML and Purescript, but of course they both have bigger learning curves and more upfront cost than TypeScript. JS is fine for most things... except when it isn't, and then I really miss having a real type system.

→ More replies (1)

13

u/the_evergrowing_fool Jun 20 '18

The amount of boilerplate with no clear benefit.

I think the boiler is product of being ad-hoc and relaying too much on JS. It would be better as an DSL base on pattern matching.

14

u/JustinsWorking Jun 20 '18

There is a lot of clear benefit.

Great seams for tests, one directional data flow, rewind, and easy debugging via actions.

If you're not using any of those, I have no idea why on earth you're using Redux.

→ More replies (3)

1

u/[deleted] Jun 20 '18

I could never get over the boilerplate after having tried re-frame for clojurescript. It's more or less the same philosophy, but you get all the same benefits with much, much less boilerplate and end up with something that feels much easier to reason about / hold in your head.

→ More replies (3)