Live data from Hacker News

Ask HN: Companies who adopted React Native over a year ago, do you regret it?

news.ycombinator.com

91–100 of 149 posts

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#91
post #56

Absolutely not. We went all in on it. We even developed our own open source framework based on it called Gluestick. It's original purpose was to make it automatically isomporphic by running the same code in the browser as on the servers, using node. We also built a component/style library that allows us to make responsive designs into web and mobile apps quickly and easily. Gluestick also allows easy creation of nati…

How are you doing code sharing between web views and native? Is this an (open-source??) high-level component library that conditionally compiles to either 's or 's? Or did you actually find a way to render ReactDOM components within React Native inside some sort of controlled web view? The latter IMO would be a holy grail for companies trying to transition large ReactDOM codebases to native apps gradually.

So we've tried a lot of things to maximize code sharing. Our initial goal was to share non-visual code like reducers/action-creators/libs/utils etc… This was pretty interesting but it didn't give us the amount of sharing that we wanted. We were still building multiple versions of many things.

The next approach we started on was using https://github.com/necolas/react-native-web. This was very exciting and very fun to work with. However, we found it difficult to optimize the web experience. Most of our traffic is on the website so we are spending a lot of time optimizing the web experience. This might not line up with other's experience but we kind of came to the conclusion that react-native-web works great for apps where the native app is the primary driver and you want to offer a web experience as a secondary experience. This became more clear when we started trying to work with our SEO team. And again when we started trying to build responsive designs with react-native-web. Doable but we ended up spending a ton of time to make the web work the way we wanted to.

Eventually we decided to go a different direction. Most of our display logic is the same or very similar between the mobile web/ios/android with a few exceptions. We found that mixing ReactNative with the webview component gave us the ability to use webviews to share the majority of the code that can be shared. When we need more native functionality we communicate with postMessage and we have access to ReactNative. Once in ReactNative if we need to go down to iOS specific or Android specific code we have the ability to do that too. We found this to be much more powerful than Cordova and the user experience is honestly amazing. This is still a work in progress but we are excited about what we've seen so far.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#92
post #54
post #40

Earlier quoted context omitted.

Why are you using RN if your app is just wrapping a web view?

On top of that my question to the OP would be, why do they need to search around for libraries that are older than RN. In a team of 10 you can most likely create your own ones, or fork already made libraries and upgrade them to fit your purpose. One of the greatest things with RN so far for my team has been that we can actually write native components and bridge them. Yes RN is changing quite fast in general and most…

The main problem we're having is that newer versions of RN use React 16. React 16 has breaking changes, particularly the changes to PropTypes and createClass, which some of our dependencies have already fixed but others haven't. This means to upgrade RN, we need to either submit fixes for all these libs or use a version of RN which still uses React 15, both of which have their own problems, especially since React 16 is still a release candidate and not a full release.

We're not creating our own libraries for a couple of reasons: firstly, this was supposed to be a quick project to see if an app is viable (but has now lasted long enough that we've run into this issue), and secondly we've already got forks of key libraries, which is taking more time away from implementing actual features since we now need to maintain them and pull in updates from the original repos.

Yes we should have kept dependencies up-to-date, but constant breaking changes are just taking too much time away from development time, so it's not a good fit for our project as it stands.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#93
post #48

Earlier quoted context omitted.

If you have to ask questions like this, you haven’t been working in the industry long enough.

It's a reasonable question. It's not clear how much interactivity is required outside of the webview, but if there's very little or none, then it would be perfectly reasonable and simple to use the native mobile APIs to wrap the webview. And thus avoid all the problems mentioned above.

Yep, that's our long-term plan, but saying we want to get rid of our working app and re-write it as two new apps from scratch doesn't go down particularly well with the business.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#94
post #40

Yes, we regret it. Our app is just a wrapper around a webview, and handles things like in-app payments and SDK integrations like Facebook login, in a team of ~10. Our version of React Native is quite far behind which makes using libraries not already in the project difficult: you have to track back through versions to find a compatible version, which then may not be doing what you want since it's an older version. We…

Why are you using RN if your app is just wrapping a web view?

When using RN with a web view you can easily communicate with RN using the postMessage API. From there, you can use RN for all of the native specific functionality. Most of the "native" code is shared between ios and android at that point. If you only need to support iOS then this is less valuable. This is the reason why things like Cordova exist. However, I find the communication between webviews and RN far more enjoyable to using Cordova + plugins.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#96
post #64

A little off topic, but I really, really wish that people would stop trying to make JavaScript be the language of everything. I have zero interest in JavaScript, I don't believe it's a nice language to work in, and the ecosystem is insane. However, given the way things are going, and the way jobs are trending around me, it seems unavoidable.

There should always be a job available for you that doesn't require writing JavasScript. However, as a counterpoint, I have been writing ruby/javascript for a while now and the last couple of years I agree the JavaScript has taken over my career. I have 0 complaints, I love modern javascript, the ecosystem, the engines, debug tools and everything between. You don't have to like it but lots of people do and lots of high quality software is being made with JavaScript.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#97
post #26

> I run a mobile team of ~30 folks. That's a... big mobile team. RN's been a good move for our smaller 2-3 person teams (2-3 devs, plus part-time designer, QA, various other roles full or part time—call it 6 personnel) though not without trade-offs. Big wins: 1) JS devs can contribute quickly and comfortably. 2) Can still easily write native code if needed (win over other native-but-not-native frameworks) 3) If you d…

Can you speak more about how you've integrated Typescript? As far as I've seen it's not officially supported, so I am wary. I also use Expo

Facebook have decided they won't support it (Flow is their thing, so that makes sense) but Microsoft has stepped up with some pretty serious support, including good docs for the process of converting a new RN project to TypeScript:

https://github.com/Microsoft/TypeScript-React-Native-Starter

Not sure whether that'd play nicely with Expo without a bunch of extra work. It is quite a bit harder to convert an existing project than to start a new one with TypeScript.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#98
post #82

We have a 15-person engineering team and converted our mobile app to React Native at the beginning of this year. We do not regret it. Our pace of delivery is much faster with React Native than what we were able to achieve building natively. Our app has over 100 screens, and only needing to implement features once to have them on both platforms is nice. The feedback loop when making code changes is much faster, especi…

It benefits your dev team, but does it benefit your customers? How's the battery usage of your RN app vs a real native app? Does your app require the latest phone hardware to run with decent performance?

React Native is native. It's nothing like trying to shoehorn rich client functionality and animations into a web view.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#99

My team has been working on our app for 1.5 years now and of all the technical choices we've made, React Native is probably our favorite. It's taken us through the prototyping stage and all the way to production without many issues. Granted, we're a very small engineering team of 3. Pros - We haven't done performance tuning and haven't had any user complaints about performance (it's a multi-channel chat app) - Most o…

I've tried making a chat application using Ionic and it's been tough. The main issue is infinite scrolling by scrolling upward. The user scrolls to the top, we make a note of the current top comment, load the next set of results, add them to the page. At this point, the scrollbar is still at the top, so we need to manually scroll down to the previous top comment. It can be a little jumpy. It certainly isn't smooth li…

We're building a chat app in RN. Last I checked, the RN components do not support the functionality that you mention out of the box.

We are using a fork of GiftedChat which has generally been a positive but not stellar experience (https://github.com/FaridSafi/react-native-gifted-chat). I understand includes some fairly clever (perhaps hacky?) and extensive changes on top of RN's components to mimic the interactions we generally expect in a chat UI. It's been performant for the most part but is quite opinionated.

I would love to know if there's a better, more modular solution out there.

Re: Ask HN: Companies who adopted React Native over a year ago, do you regret it?

#100
post #82

Earlier quoted context omitted.

It benefits your dev team, but does it benefit your customers? How's the battery usage of your RN app vs a real native app? Does your app require the latest phone hardware to run with decent performance?

React Native is native. It's nothing like trying to shoehorn rich client functionality and animations into a web view.

JavaScript still much slower and more memory-hungry than Objective C.
Post reply on HN