Using AlertIOS.prompt in React Native

AlertIOS.prompt accepts a couple of parameters. Let's take a look at them: AlertIOS.prompt( 'Title', 'Default Value', [{text: 'Button One', onPress: this.firstButtonPress.bind(this)}, {text: 'Button Two', onPress: this.secondButtonPress.bind(this)}] ) The first parameter that AlertIOS.prompt accepts is the title -- what gets displayed to the…

Using SegmentedControlIOS to Render Multiple Components in React Native

I had an issue where I wanted a Component in my React Native application to show two different ListViews depending on what was being selected. Additionally I didn't want to make a new API call every time I switched ListViews, and I had to confine this within the same TabBarIOS…

Persisting TabBars in React Native

Update, November 14 2016: It's been brought to my attention that a fix has been implemented in React Native v0.38 from this commit that fixes the underlying issue that causes NavigatorIOS components to not be usable when nested within each other. Moving forward with the official stable release of…

Section Headers in React Native ListView Components

I've been building a fun iOS application with React Native. I wanted to have my main component's ListView render more than just the current day's list of products from Product Hunt's API. Their API lets me make requests based on either a certain day or X previous days. That part's…

A Beginner's Curriculum for React

Updated January 20, 2016 I'm a huge fan of React. It's a library that makes building user interfaces simple, modular, and enjoyable. I decided to put together a list of resources for getting started with React. There's also a stellar tutorial on Redux, which is the most popular implementation of…