Live data from Hacker News

One month with React Native

whitesmith.co

21–30 of 55 posts

Re: One month with React Native

#21
Coming from a background of WebViews hybrid development (Cordova/Ionic), React Native simply blew my mind. How I see it is you get the UI advantages of doing native development, with the advantages of using React for the front-end just like I would for the web and going the native way whenever you need to.

I don't think all projects should be done with it as native development still has its place for certain kind of apps, but for a typical thin-client app wrapping a web service, it's really great.

Re: One month with React Native

#23
I'm going through a similar experience. I have some experience with Objective C and iOS, almost nothing with Android and I have good experience with (non-mobile) Java. Basically I have a week to build Android app which should be quickly ported to iOS. So far my experience is mixed. React Native feels like very powerful tech. But standard library is very minimal, tooling looks very fragile (it works, but I'm very afraid of the moment when those thousand node-gradle scripts will break), things like navigation look very complicated (I investigated react-navigation, had quick glance over other solutions and finally decided to roll my own tiny navigation and animated menu). Modern JavaScript is OK, I guess, though it's so far from proper typed language with proper tooling like Java.

What I wish to exist is something like Kotlin with react-native like library, with single good cross-platform library of components and good solid tooling.

Facebook developers are awesome, but they are paid for Facebook apps, not for making good library, IMO, good library is just a by-product which they kindly shared and it feels everywhere.

Overall I think React Native is the best cross-platform solution out there. It doesn't carry overhead of bundled HTML webview, its view is advanced enough for complex GUI, it provides smooth animations and React is something very interesting actually. Also you can push updates without app-store approvals, if I got that right (I'm not sure about Apple). For apps built in haste with multiple bug-fixes every hours it's important.

Re: One month with React Native

#24
Well regarding IDE's i'd say try WebStorm (by JetBrains).

It has the best React support ever since React existed, and every IDE feature imaginable. And also, its basically the same IDE as Android Studio, so a very small step for a App programmer.

Re: One month with React Native

#25

I'm going through a similar experience. I have some experience with Objective C and iOS, almost nothing with Android and I have good experience with (non-mobile) Java. Basically I have a week to build Android app which should be quickly ported to iOS. So far my experience is mixed. React Native feels like very powerful tech. But standard library is very minimal, tooling looks very fragile (it works, but I'm very afra…

I recommend https://github.com/wix/react-native-navigation for now, the docs is well done and makes it easier to integrate with. The UI part is implemented natively, but you interact with it on the JavaScript side.

AirBnB just started working on one too that seems promising, but it's not ready for primetime yet.

Re: One month with React Native

#26

> Next, plan your Redux store ahead. I feel like I made the mistake of overusing it. Almost every property of my app is managed by Redux and this results in large reducers and many many actions to control all that. It’s very important to figure if some prop will be needed outside a certain component or not and, if not, keep that inside that component. How can you possibly know _in advance_ if a prop will be needed ou…

Redux has a great piece of their tutorial that deals with this problem:

http://redux.js.org/docs/recipes/reducers/BasicReducerStruct....

Here are a few gotchas to avoid:

1. Define your state shape in terms of your domain data and app state, not your UI component tree.

2. Your reducers do not need to have a 1 to 1 mapping to actions. If you need to fire multiple actions to change the data you need then rethink your reducers.

Re: One month with React Native

#27

I'm going through a similar experience. I have some experience with Objective C and iOS, almost nothing with Android and I have good experience with (non-mobile) Java. Basically I have a week to build Android app which should be quickly ported to iOS. So far my experience is mixed. React Native feels like very powerful tech. But standard library is very minimal, tooling looks very fragile (it works, but I'm very afra…

Navigation is indeed a hairy beast right now. We're working hard to get React-navigation in shape for 1.0. I think the solutions from Wix and Airbnb are fantastic -- but the community deserves a really polished, JS-only solution that's ready for production. I hope you take another look at React-Nav when we release 1.0!

Disclaimer: I work on React Native, react-navigation, etc @ Expo (expo.io)

Re: One month with React Native

#28
post #10

Earlier quoted context omitted.

What database were you using and what bottlenecks did you run into? Curious as I have yet to work with dbs in React Native.

We are using SQLite. The performance bottleneck is not the database itself but conversion between the Java and JavaScript environments.

Obviously almost every react native app out there is accessing a SQL db over the network, and they work fine. Are you seriously saying that it's slower to get data over the react native bridge than over the internet?
Post reply on HN