Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

React Native Tutorial: Building iOS and Android Apps with JavaScript

In this React Native tutorial you'll learn how to build native iOS and Android apps based on the hugely popular React JavaScript library.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/485-react-native-tutorial-building-ios-apps-with-javascript
2 Likes

As kind of a meta question, isn’t React Native falling out of favor? Some reasons I saw are from multiple sources and were like:

  • Daunting patent license
  • Tools are not as good
  • Documentation issues and people having trouble googling for solutions
  • “uncertainty about its long-term roadmap”

The patent license concern is expressed in this quote:

I’m not a lawyer, so I’ve asked a lawyer to help me clarify this (and if you’re not a lawyer you should too). According to him, that clause boils down to this: if I initiate any lawsuit alleging patent infringement against Facebook, my license to use React Native would be immediately terminated.
By implication, it also seems to give Facebook a good deal of breathing room to infringe my patents

Quotes:
“…for much of the functionality that an app may require, you have to resort to third party components or build your own.” – https://kelvinpompey.me/tempted-to-abandon-react-native-for-native-android/

There’s a follow up article talking about the performance and the author’s confirmation that he’s “…still determined to explore native Android further. ”

“…documentation may be lacking…”

As another experienced developer said to me, (paraphrase): In general… If you write something with a JavaScript framework, be prepared to rewrite it to work with a new framework in just a couple (few?) years.

Summary
Sorry this is so long. However, I want to really understand where React Native is going in a few years and the long term vision.

IANAL so I won’t tackle the license question.

“Tools not as good.” I’m assuming you’re comparing to Xcode? I like Xcode a lot but I also love how fast I can spin something up using React Native. I find developing with React Native’s tools works well for me. Features like the Redbox that shows you errors while debugging are great for quick feedback and being able to debug via Chrome-like developer tools is sweet. I personally use Sublime, Atom or the Nuclide editor. Microsoft has integration for RN in VSCode. Expo has built tools around developing with RN. JetBrains added support for it in IntelliJ. It may help to know more about what tools are lacking. I find this to be a continually improving area.

The docs were revamped last year and there’s constant work going on to improve them. The community is also doing a great job pitching in and helping out.

A roadmap was published last year. I heard this complaint in the past before that was done. So that may be a throwback complaint.

There’s a lot of threads here that I’ve seen answered on the web regarding performance, long term support, whether RN is right for you, etc. RN may not always be the right solution for a given problem, however many people have adopted it for the speed of iterative development, native app user experience, and cross-platform support. It’s worth exploring, so you can try it out and ultimately you’ll have to make up your mind to see if it’s the best fit for your use case.

Thank you for addressing the concerns so rapidly. This is exactly the kind of information I was looking for. It’s too bad about the license situation. That stops it dead right away for any commercial work I do. However, perhaps it will change down the road.

I can’t successfully build the initial setup. I keep getting this error:‘React/RCTBundleURLProvider.h’ file not found.

Is this after you’ve ran the command:

react-native init PropertyFinder

And are building from Xcode?

Could you also comment with your Xcode version, the version of React Native running (you can find this by looking at the package.json content).

You could also try following the proposed fix mentioned in this issue.

Another good resource to check is some of the answers on Stack Overflow.

Hi yes I am using Xcode beta 9 version 4.

The fix that you mentioned worked. Thanks!
Another issue that I had was being thrown by a space in one of my sub directories.

Hey guys,
Thanks for the awesome tutorial.

I am a web (non-react) developer but not an app developer and have gone through tens of tutorials over the web.
Some of them would break majorly at a particular step or would jump over important bits – or would be too simplistic.

Your tutorial was perfect! It covered enough to build a proper app and worked every step of the way.
Kudos to the everyone who worked on this. You guys did an awesome job!

Hi - thanks for the great tutorial. I was hoping that you could help me troubleshoot a problem I am having - I am sure that I missed something simple, but I am pulling my hair out… :slight_smile:

I am using XCode beta 4, and my node and react native versions are up to date. When I press “Go,” the simulator tells me that the location is not recognized. The XCode debugger has the following message:

2017-08-08 10:07:13.432 [info][tid:com.facebook.react.JavaScript] https://api.nestoria.co.uk/api?country=uk&pretty=1&encoding=json&listing_type=buy&action=search_listings&page=1&place_name=undefined

I can’t figure out why the place_name is undefined! The text field for the search is filled with “london” when the simulator starts. Any ideas?

Thanks a bunch.
Regards,
Mike

That is odd. Does it work if you change the text in the simulator to something else, say “manchester” before tapping Go?

You may also want to compare your project with the final project to see if they match, specifically the SearchPage.js file.

Yes, I changed the city, and still no luck. I used Kaleidoscope to diff my Search.js file vs the completed project, and there were no differences. The only thing I can think of is that I am running Little Snitch, and it may have blocked the attempted connection from the simulator to the API, but I temporarily stopped the Network Monitor and tried again - and I got the same result.

Very perplexing.

Regards,
Mike

While I think of this more, are you able to run the completed project included in the tutorial and does that give you the same error?

Good question. Tried that - same result.

I figured it out! I did have a typo in _onSearchPressed. The second argument for urlForQueryAndPage was this.setState.searchString, not this.state.searchString. I feel foolish. Thanks for helping!

Regards,
Mike

Ok, good that you figured it out. I was stumped since you said the final project downloaded gave the same result.

That’s true, it did. Maybe I thought I was running the downloaded project when I was actually running my project (same name). I feel even more foolish… :slight_smile:

Hi, thanks for making the tutorial it’s been really helpful. I am trying to do the challenge without checking the answer. I managed to navigate from a listview item to a new component but I can’t figure out how to access data in this component. Here is my component when I select the cell.


Here’s my code.

My question is, I how do I access data in the cell component? When I try and pass props to it such as this
passProps: { listings: response.listings } it doesn’t recognize the object

Hi, thanks for the tutorial but I’m facing an issue while trying follow it step by step, I’m totally new and I don’t know how to deal with it. The error occur after I create SearchPage class and edit render function of PropertyFinder class. Can you take a look?

@cabernathy Can you please help with this when you get a chance? Thank you - much appreciated! :]