Last time I shared a few IDE-related tidbits. This week, I have some quick tidbits on getting started with React Native!
My latest project is using React Native (with TypeScript), so I've been doing a lot of studying and preparation.
One of the tutorials I went through had me set up a fresh project using React Native's TypeScript template. Unfortunately, I discovered that it wouldn't build for iOS! After a little searching, it turns out there's a known issue: https://github.com/facebook/react-native/issues/30836
In my sample project, I took the approach of commenting out the "Flipper" dependency, which allowed the app to build successfully.
I know React Native gets a lot of bad press, but in my opinion, the underlying principles modeled in React (unidirectional data flow, etc.) are awesome, and native Android development could benefit a lot from using patterns like this! If you're interested in learning more, this "Thinking in React" article from the official React website (and the rest of their "Main Concepts" documentation) were especially helpful: https://reactjs.org/docs/thinking-in-react.html
As an Android developer, I haven't had many reasons to use Xcode before, but I'm excited by the idea of getting to develop for iOS (I've been an Apple fan for the past 25+ years). I did run into one issue (at least on my somewhat locked-down work laptop) - the standard instructions of installing Cocoa Pods via the gem
command didn't work for me. But, I was able to get it working by installing them via brew
.
It's also important to make sure the Xcode Command Line Tools path is set in Xcode->Preferences->Locations. If it's not, you won't be able to build iOS apps in React Native!
Have any other helpful tidbits for someone getting started with React Native? Let me know in the comments!
Interested in working with me in the awesome Digital Products team here at Accenture? We're hiring!
Top comments (0)